/* ============================================
   Templates4Make — Additional components v2
   Breadcrumbs, TOC, FAQ, Filters, 404, Newsletter
   ============================================ */

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--ink-500);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--ink-500);
  transition: color 0.15s ease;
}

.breadcrumb a:hover {
  color: var(--ink-900);
}

.breadcrumb-separator {
  color: var(--ink-300);
}

.breadcrumb-current {
  color: var(--ink-900);
  font-weight: 500;
}

/* Table of Contents */
.toc {
  background: var(--ink-50);
  border-left: 3px solid var(--brand-500);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.toc-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--ink-700);
  margin-bottom: 0.75rem;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc-list a {
  font-size: 0.9375rem;
  color: var(--ink-700);
  display: block;
  line-height: 1.5;
}

.toc-list a:hover {
  color: var(--brand-600);
}

.toc-list .toc-h3 {
  padding-left: 1rem;
  font-size: 0.875rem;
  color: var(--ink-500);
}

/* FAQ accordion (sur comparaisons) */
.faq {
  margin: 3rem 0;
}

.faq-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: -0.015em;
  color: var(--ink-900);
}

.faq-item {
  border-bottom: 1px solid var(--ink-100);
}

.faq-item details {
  padding: 1.25rem 0;
}

.faq-item summary {
  font-weight: 500;
  color: var(--ink-900);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-right: 0.5rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--ink-500);
  font-weight: 300;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item details[open] summary::after {
  transform: rotate(45deg);
}

.faq-item details > div {
  padding-top: 1rem;
  color: var(--ink-700);
  line-height: 1.7;
}

.faq-item details > div p {
  margin-bottom: 0.75rem;
}

.faq-item details > div p:last-child {
  margin-bottom: 0;
}

/* Filters bar (templates listing) */
.filters {
  background: var(--ink-50);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.filter-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-700);
  margin-right: 0.25rem;
}

.filter-chip {
  font-size: 0.8125rem;
  background: white;
  border: 1px solid var(--ink-200);
  color: var(--ink-700);
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.filter-chip:hover {
  border-color: var(--ink-300);
  color: var(--ink-900);
}

.filter-chip.active {
  background: var(--ink-900);
  color: white;
  border-color: var(--ink-900);
}

.filter-count {
  margin-left: auto;
  font-size: 0.8125rem;
  color: var(--ink-500);
}

/* Newsletter capture */
.newsletter {
  background: linear-gradient(135deg, var(--brand-50) 0%, var(--ink-50) 100%);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin: 3rem 0;
  text-align: center;
}

.newsletter h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 0.5rem;
}

.newsletter p {
  font-size: 0.9375rem;
  color: var(--ink-700);
  margin-bottom: 1.25rem;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  max-width: 24rem;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-family: inherit;
  background: white;
  color: var(--ink-900);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px var(--brand-100);
}

.newsletter-success {
  color: var(--green-600);
  font-size: 0.9375rem;
  font-weight: 500;
  margin-top: 0.75rem;
  display: none;
}

.newsletter-success.visible {
  display: block;
}

/* 404 page */
.error-page {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  max-width: 36rem;
  margin: 0 auto;
}

.error-code {
  font-size: 6rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--ink-900) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 1rem;
}

.error-page h1 {
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.error-page p {
  color: var(--ink-500);
  margin-bottom: 2rem;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.error-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* About / Contact pages */
.content-page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.content-page h1 {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin-bottom: 1rem;
}

.content-page-lead {
  font-size: 1.25rem;
  color: var(--ink-500);
  line-height: 1.6;
  margin-bottom: 3rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

.contact-card {
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.contact-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-500);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.contact-card-value {
  font-size: 1.0625rem;
  color: var(--ink-900);
  font-weight: 500;
}

.contact-card-value a:hover {
  color: var(--brand-600);
}

/* Helpers */
.scroll-margin {
  scroll-margin-top: 5rem;
}

/* ============================================
   Pricing Calculator
   ============================================ */
.calculator {
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-xl);
  padding: 2rem;
  margin: 3rem 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.calculator-header {
  margin-bottom: 2rem;
}

.calculator-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
}

.calculator-subtitle {
  font-size: 0.9375rem;
  color: var(--ink-500);
}

.calculator-input-group {
  margin-bottom: 1.5rem;
}

.calculator-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-700);
  margin-bottom: 0.5rem;
}

.calculator-help {
  font-size: 0.8125rem;
  color: var(--ink-500);
  margin-top: 0.375rem;
  line-height: 1.5;
}

.calculator-slider-wrapper {
  position: relative;
  padding: 0.5rem 0;
}

.calculator-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--ink-200);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.calculator-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: var(--brand-600);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.4);
  transition: transform 0.1s ease;
}

.calculator-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.calculator-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--brand-600);
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.4);
}

.calculator-value-display {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.calculator-current-value {
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.02em;
}

.calculator-current-value-label {
  font-size: 0.875rem;
  color: var(--ink-500);
}

.calculator-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.calculator-preset {
  font-size: 0.8125rem;
  background: var(--ink-50);
  border: 1px solid var(--ink-200);
  color: var(--ink-700);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.calculator-preset:hover {
  border-color: var(--brand-500);
  color: var(--brand-700);
  background: var(--brand-50);
}

.calculator-results {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .calculator-results { grid-template-columns: repeat(2, 1fr); }
}

.calc-result-card {
  position: relative;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 2px solid var(--ink-100);
  transition: all 0.2s ease;
}

.calc-result-card.winner {
  border-color: var(--brand-600);
  background: linear-gradient(135deg, var(--brand-50) 0%, white 100%);
}

.calc-result-card.loser {
  opacity: 0.85;
}

.calc-result-badge {
  position: absolute;
  top: -10px;
  right: 1.5rem;
  background: var(--brand-600);
  color: white;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
}

.calc-result-name {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 0.5rem;
}

.calc-result-plan {
  font-size: 0.8125rem;
  color: var(--ink-500);
  margin-bottom: 1rem;
}

.calc-result-price {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.03em;
  line-height: 1;
}

.calc-result-period {
  font-size: 0.875rem;
  color: var(--ink-500);
  font-weight: 400;
}

.calc-result-yearly {
  font-size: 0.8125rem;
  color: var(--ink-500);
  margin-top: 0.5rem;
}

.calc-result-feature {
  font-size: 0.8125rem;
  color: var(--ink-700);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ink-100);
}

.calc-savings {
  background: var(--ink-900);
  color: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
  text-align: center;
}

.calc-savings-label {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-300);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.calc-savings-amount {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1;
}

.calc-savings-note {
  font-size: 0.875rem;
  color: var(--ink-300);
  margin-top: 0.5rem;
}

.calc-cta {
  margin-top: 1.5rem;
  text-align: center;
}

.calc-disclaimer {
  font-size: 0.75rem;
  color: var(--ink-500);
  text-align: center;
  margin-top: 1rem;
  line-height: 1.5;
}

/* ============================================
   Pillar Guide — Components SEO 2026
   ============================================ */

/* Author byline */
.author-byline {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  border-top: 1px solid var(--ink-100);
  border-bottom: 1px solid var(--ink-100);
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-700) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.9375rem;
  flex-shrink: 0;
}

.author-info {
  flex: 1;
  min-width: 0;
}

.author-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink-900);
}

.author-meta {
  font-size: 0.8125rem;
  color: var(--ink-500);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.author-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Key takeaways box */
.key-takeaways {
  background: var(--ink-50);
  border-left: 4px solid var(--brand-600);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin: 2rem 0;
}

.key-takeaways-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--brand-700);
  margin-bottom: 0.75rem;
}

.key-takeaways ul {
  margin: 0;
  padding-left: 1.25rem;
}

.key-takeaways li {
  margin-bottom: 0.5rem;
  color: var(--ink-900);
  line-height: 1.55;
}

.key-takeaways li:last-child {
  margin-bottom: 0;
}

/* Quick answer (featured snippet bait) */
.quick-answer {
  background: linear-gradient(135deg, var(--brand-50) 0%, white 100%);
  border: 1px solid var(--brand-100);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1rem 0 2rem;
}

.quick-answer-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--brand-700);
  margin-bottom: 0.375rem;
}

.quick-answer-content {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ink-900);
  line-height: 1.55;
  margin: 0;
}

/* Callout boxes (note, warning, tip) */
.callout {
  border-radius: var(--radius-md);
  padding: 1.125rem 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
}

.callout-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1.4;
}

.callout-content {
  flex: 1;
}

.callout-content > *:first-child { margin-top: 0; }
.callout-content > *:last-child { margin-bottom: 0; }

.callout-tip {
  background: var(--green-50);
  border: 1px solid #a7f3d0;
}
.callout-tip .callout-icon { color: var(--green-600); }

.callout-note {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
}
.callout-note .callout-icon { color: var(--brand-700); }

.callout-warning {
  background: var(--amber-50);
  border: 1px solid #fde68a;
}
.callout-warning .callout-icon { color: var(--amber-700); }

/* Comparison table styling (better for snippets) */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.comparison-table th {
  background: var(--ink-50);
  font-weight: 600;
  color: var(--ink-900);
  text-align: left;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--ink-100);
}

.comparison-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--ink-100);
  color: var(--ink-700);
  vertical-align: top;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table .check { color: var(--green-600); font-weight: 600; }
.comparison-table .cross { color: #dc2626; font-weight: 600; }
.comparison-table .partial { color: var(--amber-700); font-weight: 600; }

/* HowTo step */
.howto-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.howto-step {
  counter-increment: step;
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.25rem 1.25rem 0;
  border-bottom: 1px solid var(--ink-100);
  position: relative;
}

.howto-step:last-child { border-bottom: none; }

.howto-step::before {
  content: counter(step);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--ink-900);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.howto-step-content {
  flex: 1;
  padding-top: 0.25rem;
}

.howto-step-title {
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 0.375rem;
  font-size: 1.0625rem;
}

.howto-step-content p {
  margin-bottom: 0.5rem;
}

/* Updated date stamp */
.last-updated {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--ink-500);
  background: var(--ink-50);
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
}

.last-updated::before {
  content: '✓';
  color: var(--green-600);
  font-weight: 600;
}

/* Sticky TOC for desktop */
@media (min-width: 1280px) {
  .article.with-sticky-toc {
    max-width: 75rem;
    display: grid;
    grid-template-columns: 1fr 16rem;
    gap: 3rem;
  }

  .article.with-sticky-toc > .article-header,
  .article.with-sticky-toc > .article-back,
  .article.with-sticky-toc > div:not(.toc-sticky) {
    grid-column: 1;
  }

  .toc-sticky {
    grid-column: 2;
    grid-row: 2 / span 99;
    position: sticky;
    top: 5rem;
    align-self: start;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    padding-right: 0.5rem;
    border-left: 1px solid var(--ink-100);
    padding-left: 1.25rem;
    font-size: 0.875rem;
  }

  .toc-sticky-title {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--ink-500);
    margin-bottom: 0.875rem;
  }

  .toc-sticky ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .toc-sticky li {
    margin-bottom: 0.5rem;
  }

  .toc-sticky li.toc-h3 {
    padding-left: 0.875rem;
    font-size: 0.8125rem;
  }

  .toc-sticky a {
    color: var(--ink-500);
    text-decoration: none;
    line-height: 1.4;
    display: block;
    padding: 0.125rem 0;
    transition: color 0.15s ease;
  }

  .toc-sticky a:hover,
  .toc-sticky a.active {
    color: var(--brand-600);
  }
}

/* Sources section */
.sources {
  margin: 3rem 0 2rem;
  padding: 1.5rem;
  background: var(--ink-50);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.sources-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--ink-500);
  margin-bottom: 0.75rem;
}

.sources ol {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--ink-700);
}

.sources li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.sources a {
  color: var(--brand-600);
  word-break: break-word;
}

.sources a:hover {
  color: var(--brand-700);
}

/* Related guides grid */
.related-guides {
  margin: 3rem 0;
}

.related-guides-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--ink-900);
}

.related-guides-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .related-guides-grid { grid-template-columns: repeat(2, 1fr); }
}

.related-guide-card {
  display: block;
  border: 1px solid var(--ink-100);
  border-radius: var(--radius-md);
  padding: 1.125rem;
  transition: all 0.15s ease;
}

.related-guide-card:hover {
  border-color: var(--ink-300);
  background: var(--ink-50);
}

.related-guide-card h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 0.375rem;
}

.related-guide-card:hover h4 {
  color: var(--brand-600);
}

.related-guide-card p {
  font-size: 0.875rem;
  color: var(--ink-500);
  margin: 0;
  line-height: 1.5;
}
