/*
 * Shared editorial index treatment for /blog and /lexique.
 * Intentionally scoped to html.editorial-index-theme.
 */

html.site-home-theme.editorial-index-theme {
  --ei-bg: var(--site-home-bg, oklch(0.99 0.003 80));
  --ei-surface: var(--site-home-surface, oklch(0.998 0.002 80));
  --ei-ground: oklch(0.97 0.006 80);
  --ei-heading: var(--site-home-heading, oklch(0.20 0.018 250));
  --ei-text: var(--site-home-text, oklch(0.34 0.014 250));
  --ei-muted: var(--site-home-muted, oklch(0.48 0.012 250));
  --ei-soft: var(--site-home-soft, oklch(0.62 0.010 250));
  --ei-border: var(--site-home-border, oklch(0.86 0.010 80));
  --ei-rule: oklch(0.92 0.008 80);
  --ei-accent: var(--site-home-accent, oklch(0.43 0.16 25));
  --ei-accent-dark: var(--site-home-accent-dark, oklch(0.34 0.14 25));
  --ei-accent-soft: var(--site-home-accent-soft, oklch(0.43 0.16 25 / 0.08));
  --ei-radius: 8px;
}

html.editorial-index-theme body {
  background: var(--ei-bg);
  color: var(--ei-text);
}

html.editorial-index-theme #main-content.main-wide {
  width: min(1180px, calc(100% - 40px));
  max-width: 1180px;
  margin-right: auto;
  margin-bottom: 0;
  margin-left: auto;
  padding-bottom: 72px;
}

html.editorial-index-theme .editorial-eyebrow {
  margin: 0 0 12px;
  color: var(--ei-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.3;
  text-transform: uppercase;
}

html.editorial-index-theme .page-title {
  max-width: 840px;
  margin: 0 0 16px;
  color: var(--ei-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-align: left;
}

html.editorial-index-theme .page-description {
  max-width: 72ch;
  margin: 0;
  color: var(--ei-muted) !important;
  font-size: 1rem !important;
  line-height: 1.65;
  text-align: left !important;
}

html.editorial-index-theme .blog-hero {
  max-width: none;
  margin: 0 0 42px;
  padding: 38px 0 34px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ei-border);
  border-radius: 0;
  text-align: left;
}

html.editorial-index-theme .blog-search-wrapper {
  max-width: 680px;
  margin: 28px 0 0;
}

html.editorial-index-theme .blog-search-input,
html.editorial-index-theme .search-input {
  min-height: 48px;
  padding: 11px 96px 11px 14px;
  color: var(--ei-heading);
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius);
  box-shadow: none;
  font: inherit;
  line-height: 1.4;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

html.editorial-index-theme .search-input {
  padding-right: 14px;
}

html.editorial-index-theme .blog-search-input::placeholder,
html.editorial-index-theme .search-input::placeholder {
  color: var(--ei-soft);
  opacity: 1;
}

html.editorial-index-theme .blog-search-input:focus,
html.editorial-index-theme .search-input:focus {
  outline: none;
  border-color: var(--ei-accent);
  box-shadow: 0 0 0 3px var(--ei-accent-soft);
}

html.editorial-index-theme .blog-search-icon {
  right: 15px;
  color: var(--ei-soft);
}

html.editorial-index-theme .blog-mic-btn {
  right: 43px;
  width: 44px;
  height: 44px;
  color: var(--ei-muted);
  border-radius: 6px;
}

html.editorial-index-theme .blog-mic-btn:hover {
  color: var(--ei-accent);
  background: var(--ei-accent-soft);
}

html.editorial-index-theme .search-meta {
  max-width: 680px;
  min-height: 44px;
  margin: 8px 0 0;
  justify-content: space-between;
  gap: 16px;
}

html.editorial-index-theme .search-count {
  margin: 0;
  color: var(--ei-muted);
  font-size: 0.78rem;
  text-align: left;
}

html.editorial-index-theme .search-mode-toggle {
  gap: 0;
  padding: 0;
  background: transparent;
  border: 1px solid var(--ei-border);
  border-radius: 6px;
}

html.editorial-index-theme .mode-btn {
  min-height: 44px;
  padding: 8px 14px;
  color: var(--ei-muted);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--ei-border);
  border-radius: 0;
  font-size: 0.78rem;
  transition: color 160ms ease, background-color 160ms ease;
}

html.editorial-index-theme .mode-btn:first-child {
  border-radius: 5px 0 0 5px;
}

html.editorial-index-theme .mode-btn:last-child {
  border-right: 0;
  border-radius: 0 5px 5px 0;
}

html.editorial-index-theme .mode-btn:hover {
  color: var(--ei-accent);
  background: var(--ei-accent-soft);
}

html.editorial-index-theme .mode-btn.active {
  color: var(--ei-surface);
  background: var(--ei-accent);
  box-shadow: none;
  font-weight: 700;
}

html.editorial-index-theme .search-badge {
  padding: 3px 7px;
  color: var(--ei-accent);
  background: var(--ei-accent-soft);
  border: 1px solid color-mix(in oklch, var(--ei-accent) 30%, var(--ei-border));
  border-radius: 6px;
  font-size: 0.7rem;
}

html.editorial-index-theme .blog-container {
  max-width: none;
  padding: 0;
}

html.editorial-index-theme .blog-row,
html.editorial-index-theme .lexique-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  width: 100%;
  margin: 0;
  padding: 0;
}

html.editorial-index-theme .blog-col {
  margin: 0;
  transition: none;
}

html.editorial-index-theme .article-vignette,
html.editorial-index-theme .lexique-card {
  width: 100%;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  color: var(--ei-text);
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: var(--ei-radius);
  box-shadow: 0 3px 12px oklch(0.20 0.018 250 / 0.045);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

html.editorial-index-theme .article-vignette:hover,
html.editorial-index-theme .lexique-card:hover {
  transform: none;
  border-color: color-mix(in oklch, var(--ei-accent) 48%, var(--ei-border));
  box-shadow: 0 5px 16px oklch(0.20 0.018 250 / 0.07);
}

html.editorial-index-theme .article-image,
html.editorial-index-theme .lexique-image {
  width: 100%;
  height: 188px;
  object-fit: cover;
  background: var(--ei-ground);
  border-bottom: 1px solid var(--ei-rule);
}

html.editorial-index-theme .article-content,
html.editorial-index-theme .lexique-content {
  padding: 20px;
}

html.editorial-index-theme .article-title,
html.editorial-index-theme .lexique-title {
  margin: 0 0 10px;
  color: var(--ei-heading);
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.35;
  text-decoration: none;
  transition: color 160ms ease;
}

html.editorial-index-theme .article-title:hover,
html.editorial-index-theme .lexique-title:hover {
  color: var(--ei-accent);
}

html.editorial-index-theme .article-meta,
html.editorial-index-theme .lexique-meta {
  margin: 0 0 14px;
  color: var(--ei-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
}

html.editorial-index-theme .lexique-preview {
  margin: 0 0 20px;
  color: var(--ei-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

html.editorial-index-theme .lexique-preview > :first-child {
  margin-top: 0;
}

html.editorial-index-theme .lexique-preview > :last-child {
  margin-bottom: 0;
}

html.editorial-index-theme .article-button,
html.editorial-index-theme .read-more-button {
  min-height: 44px;
  padding: 10px 14px;
  color: var(--ei-surface);
  background: var(--ei-accent);
  border: 1px solid var(--ei-accent);
  border-radius: 6px;
  box-shadow: none;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
  transition: background-color 160ms ease, border-color 160ms ease;
}

html.editorial-index-theme .article-button {
  width: 100%;
  margin: auto 0 14px;
}

html.editorial-index-theme .article-button:hover,
html.editorial-index-theme .read-more-button:hover {
  transform: none;
  color: var(--ei-surface);
  background: var(--ei-accent-dark);
  border-color: var(--ei-accent-dark);
  box-shadow: none;
}

html.editorial-index-theme .categories-container {
  gap: 6px;
  margin: 0;
}

html.editorial-index-theme .category-button,
html.editorial-index-theme .tag,
html.editorial-index-theme .filter-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px 11px;
  color: var(--ei-muted);
  background: var(--ei-ground);
  border: 1px solid var(--ei-border);
  border-radius: 6px;
  box-shadow: none;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

html.editorial-index-theme .category-button[data-category],
html.editorial-index-theme .tag[data-category] {
  background: var(--ei-ground);
}

html.editorial-index-theme .category-button:hover,
html.editorial-index-theme .tag:hover,
html.editorial-index-theme .filter-button:hover {
  transform: none;
  color: var(--ei-accent);
  background: var(--ei-accent-soft);
  border-color: color-mix(in oklch, var(--ei-accent) 45%, var(--ei-border));
  box-shadow: none;
  opacity: 1;
}

html.editorial-index-theme .tag.active,
html.editorial-index-theme .filter-button.active {
  transform: none;
  color: var(--ei-surface);
  background: var(--ei-accent);
  border-color: var(--ei-accent);
  box-shadow: none;
  opacity: 1;
}

html.editorial-index-theme .filter-section {
  max-width: none;
  margin: 0 0 38px;
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--ei-border);
}

html.editorial-index-theme .filter-section::before {
  display: block;
  margin: 0 0 12px;
  color: var(--ei-accent);
  content: "Explorer le lexique";
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.3;
  text-transform: uppercase;
}

html.editorial-index-theme .search-container {
  max-width: 680px;
  margin: 0 0 18px;
}

html.editorial-index-theme .filter-categories {
  justify-content: flex-start;
  gap: 7px;
  margin: 0;
}

html.editorial-index-theme .pagination {
  gap: 6px;
  margin: 42px 0 0;
}

html.editorial-index-theme .pagination li {
  margin: 0;
  padding: 0;
}

html.editorial-index-theme .pagination li a,
html.editorial-index-theme .pagination li span {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 8px 12px;
  color: var(--ei-muted);
  background: var(--ei-surface);
  border: 1px solid var(--ei-border);
  border-radius: 6px;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

html.editorial-index-theme .pagination li a:hover {
  color: var(--ei-accent);
  background: var(--ei-accent-soft);
  border-color: color-mix(in oklch, var(--ei-accent) 45%, var(--ei-border));
}

html.editorial-index-theme .pagination li.active a,
html.editorial-index-theme .pagination li.active span {
  color: var(--ei-surface);
  background: var(--ei-accent);
  border-color: var(--ei-accent);
}

html.editorial-index-theme .pagination li.disabled a,
html.editorial-index-theme .pagination li.disabled span {
  color: var(--ei-soft);
  background: var(--ei-ground);
  border-color: var(--ei-rule);
  cursor: not-allowed;
}

html.editorial-index-theme .faq-section {
  max-width: 900px;
  margin: 64px 0 0;
  padding: 34px 0 0;
  border-top: 1px solid var(--ei-border);
}

html.editorial-index-theme .faq-header {
  margin: 0 0 16px;
  text-align: left;
}

html.editorial-index-theme .faq-header h2 {
  margin: 0;
  color: var(--ei-heading);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

html.editorial-index-theme .faq-item {
  border-bottom: 1px solid var(--ei-border);
}

html.editorial-index-theme .faq-question {
  min-height: 56px;
  padding: 16px 0;
  color: var(--ei-heading);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.4;
}

html.editorial-index-theme .faq-question:hover {
  color: var(--ei-accent);
}

html.editorial-index-theme .faq-icon {
  margin-left: 18px;
  color: var(--ei-accent);
}

html.editorial-index-theme .faq-answer p {
  padding: 0 36px 18px 0;
  color: var(--ei-muted);
  line-height: 1.65;
}

html.editorial-index-theme .search-highlight {
  padding: 1px 2px;
  color: var(--ei-heading);
  background: var(--ei-accent-soft);
  border-radius: 2px;
}

html.editorial-index-theme .search-no-results {
  color: var(--ei-muted);
  border-top: 1px solid var(--ei-border);
  border-bottom: 1px solid var(--ei-border);
}

html.editorial-index-theme .blog-col.search-result {
  transform: none;
  box-shadow: none;
}

html.editorial-index-theme :is(
  a,
  button,
  input,
  [tabindex]
):focus-visible {
  outline: 2px solid var(--ei-accent);
  outline-offset: 3px;
}

@media (max-width: 992px) {
  html.editorial-index-theme .blog-row,
  html.editorial-index-theme .lexique-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html.editorial-index-theme .article-image,
  html.editorial-index-theme .lexique-image {
    height: 176px;
  }
}

@media (max-width: 640px) {
  html.editorial-index-theme #main-content.main-wide {
    width: calc(100% - 32px);
    padding-bottom: 52px;
  }

  html.editorial-index-theme .editorial-eyebrow {
    margin-bottom: 10px;
  }

  html.editorial-index-theme .page-title {
    margin-top: 0;
    font-size: clamp(1.8rem, 10vw, 2.35rem);
  }

  html.editorial-index-theme .blog-hero {
    margin-top: -35px;
    margin-bottom: 30px;
    padding: 0 0 28px;
  }

  html.editorial-index-theme .search-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  html.editorial-index-theme .search-mode-toggle {
    width: 100%;
  }

  html.editorial-index-theme .mode-btn {
    flex: 1 1 50%;
  }

  html.editorial-index-theme .blog-row,
  html.editorial-index-theme .lexique-container {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  html.editorial-index-theme .article-image,
  html.editorial-index-theme .lexique-image {
    height: 184px;
  }

  html.editorial-index-theme .article-content,
  html.editorial-index-theme .lexique-content {
    padding: 18px;
  }

  html.editorial-index-theme .filter-section {
    padding-top: 26px;
  }

  html.editorial-index-theme .filter-categories {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html.editorial-index-theme .tag {
    width: 100%;
    text-align: center;
  }

  html.editorial-index-theme .pagination {
    gap: 4px;
    margin-top: 32px;
  }

  html.editorial-index-theme .pagination li a,
  html.editorial-index-theme .pagination li span {
    padding: 7px 9px;
  }

  html.editorial-index-theme .faq-section {
    margin-top: 50px;
    padding-top: 28px;
  }
}

@media (max-width: 420px) {
  html.editorial-index-theme .filter-categories {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.editorial-index-theme *,
  html.editorial-index-theme *::before,
  html.editorial-index-theme *::after {
    scroll-behavior: auto;
    transition-duration: 0.01ms;
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
  }
}
