/* =============================================================================
   ARCHIVE MINÉRALE FRANÇAISE — Maurice Bardèche
   -----------------------------------------------------------------------------
   Esthétique sobre, littéraire, documentaire : papier grisé, vert-de-gris,
   encre froide. Charge APRÈS pleiade-archiv.css (apparence uniquement).
   ============================================================================= */

/* ---------- 1. Palette & jetons ---------- */
:root {
  --bg-main: #ECE8DE;
  --bg-secondary: #D8D8CC;
  --bg-card: #F5F2EA;

  --text-main: #171A17;
  --text-muted: #5D625B;

  --verdigris: #6F8075;
  --verdigris-dark: #4F6157;
  --lead-gray: #3D423F;
  --stone-gray: #A8AAA2;

  --accent-dark: #2F3A34;
  --border-soft: #B9B7AA;

  --am-serif: "Cormorant Garamond", "EB Garamond", "Playfair Display", Georgia, serif;
  --am-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --am-mono: "DM Mono", ui-monospace, monospace;

  --am-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");

  --_typography---type-font-headings: var(--am-serif);
  --_typography---type-font-badges: var(--am-serif);
  --_typography---type-font-body: var(--am-sans);
  --_color---color-brand: var(--verdigris-dark);
  --_color---color-text-on-brand: var(--bg-card);
}

/* ---------- 2. Thème clair (référence éditoriale) ---------- */
:root[data-theme="light"],
html[data-theme="light"] {
  --lit-void: var(--bg-secondary);
  --lit-paper: var(--bg-main);
  --lit-paper-raised: var(--bg-secondary);
  --lit-paper-card: var(--bg-card);
  --lit-rule: var(--border-soft);
  --lit-rule-soft: #C9C7BC;
  --lit-ink: var(--text-main);
  --lit-ink-muted: var(--text-muted);
  --lit-ink-faint: var(--stone-gray);
  --lit-accent: var(--verdigris);
  --lit-accent-strong: var(--verdigris-dark);
  --lit-wine: var(--verdigris);
  --lit-wine-muted: var(--verdigris-dark);

  --text-primary: var(--text-main);
  --text-secondary: var(--text-muted);
  --text-muted: var(--text-muted);
  --text-accent: var(--lead-gray);

  --bg-primary: var(--bg-main);
  --bg-secondary: var(--bg-secondary);
  --bg-card: var(--bg-card);
  --bg-overlay: rgba(236, 232, 222, 0.96);

  --border-primary: var(--border-soft);
  --border-secondary: var(--lit-rule-soft);
  --border-accent: var(--verdigris);

  --bg: var(--bg-primary);
  --bg-alt: var(--bg-secondary);
  --bg-section: var(--bg-secondary);
  --text: var(--text-primary);
  --text-alt: var(--text-secondary);
  --border: var(--border-primary);

  --metal-dark: var(--bg-secondary);
  --metal-mid: var(--bg-main);
  --metal-blue: var(--bg-card);
  --metal-steel: var(--stone-gray);
  --metal-silver: var(--text-muted);
  --metal-line: var(--border-soft);
  --accent-cyan-steel: var(--verdigris);
  --accent-blue-steel: var(--verdigris-dark);

  --lfc-focus: var(--verdigris);
  --lfc-focus-offset: var(--bg-main);
  color-scheme: light;
}

/* ---------- 3. Thème sombre (cabinet d’archive, pas militaire) ---------- */
:root[data-theme="dark"],
html[data-theme="dark"] {
  --lit-void: #252926;
  --lit-paper: #2F3A34;
  --lit-paper-raised: #3D423F;
  --lit-paper-card: #454C48;
  --lit-rule: #5A625C;
  --lit-rule-soft: #4A524D;
  --lit-ink: #ECE8DE;
  --lit-ink-muted: #A8AAA2;
  --lit-ink-faint: #7A8078;
  --lit-accent: #8A9B90;
  --lit-accent-strong: #A8B5AC;
  --lit-wine: var(--verdigris);
  --lit-wine-muted: #6F8075;

  --text-primary: var(--lit-ink);
  --text-secondary: var(--lit-ink-muted);
  --text-muted: var(--lit-ink-muted);
  --text-accent: var(--lit-accent-strong);

  --bg-primary: var(--lit-paper);
  --bg-secondary: var(--lit-paper-raised);
  --bg-card: var(--lit-paper-card);
  --bg-overlay: rgba(47, 58, 52, 0.94);

  --border-primary: var(--lit-rule);
  --border-secondary: var(--lit-rule-soft);

  --bg: var(--bg-primary);
  --bg-alt: var(--bg-secondary);
  --bg-section: var(--lit-paper-raised);
  --text: var(--text-primary);
  --text-alt: var(--text-secondary);
  --border: var(--border-primary);

  --metal-dark: var(--lit-void);
  --metal-mid: var(--lit-paper);
  --metal-blue: var(--lit-paper-card);
  --accent-cyan-steel: var(--verdigris);

  --lfc-focus: var(--lit-accent);
  --lfc-focus-offset: var(--lit-paper);
  color-scheme: dark;
}

/* ---------- 4. Fond & corps ---------- */
body {
  font-family: var(--am-sans);
  font-size: 1.0625rem;
  line-height: 1.72;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  background-color: var(--lit-paper);
  background-image: var(--am-grain);
  background-size: 200px 200px;
  background-attachment: fixed;
}

html[data-theme="light"] body {
  background-color: var(--bg-main);
}

html[data-theme="dark"] body {
  background-image:
    radial-gradient(120% 80% at 50% -10%, rgba(111, 128, 117, 0.08), transparent 50%),
    var(--am-grain);
}

.lfc-main,
.ej-footer {
  position: relative;
}

/* ---------- 5. Typographie ---------- */
.heading---h2,
.heading---h1,
h1, h2, h3,
.ej-section-title-archival,
.ej-leitmotive-title,
.ej-title,
.ej-drogen-title,
.gallery-title,
.ej-bibliography-title,
.ej-leitmotive-card-title,
.ej-drogen-card-title,
.ej-link-card-title,
.ej-footer-section-title {
  font-family: var(--am-serif);
  color: var(--lead-gray);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-shadow: none;
}

html[data-theme="dark"] .heading---h2,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] .ej-section-title-archival,
html[data-theme="dark"] .ej-leitmotive-title,
html[data-theme="dark"] .ej-title,
html[data-theme="dark"] .gallery-title {
  color: var(--lit-ink);
}

.heading---h2 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.15;
  font-weight: 600;
}

p,
.ej-leitmotive-card-desc,
.ej-drogen-card-desc,
.ej-timeline-title,
.ej-bibliography-description {
  font-family: var(--am-sans);
  color: var(--text-primary);
  line-height: 1.72;
}

.ej-military-subtitle,
.ej-link-card-category,
.ej-section-number {
  font-family: var(--am-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.ej-section-number {
  font-family: var(--am-mono);
  color: var(--verdigris-dark);
  letter-spacing: 0.18em;
}

html[data-theme="dark"] .ej-section-number {
  color: var(--lit-accent);
}

/* ---------- 6. Filets & séparateurs (vert-de-gris discret) ---------- */
.ej-hud-mark {
  display: inline-block;
  width: clamp(32px, 7vw, 64px);
  height: 1px;
  margin: 0 0.75rem;
  vertical-align: middle;
  background: linear-gradient(90deg, transparent, var(--verdigris) 25%, var(--verdigris) 75%, transparent);
  opacity: 0.65;
}

.ej-hud-mark::after {
  display: none;
}

.ej-quote-hud {
  background: var(--verdigris) !important;
  opacity: 0.5;
}

.ej-leitmotive-section::before,
.ej-timeline-section::before,
.gallery-section::before,
.ej-drogen-section::before,
.mm-citations-section::before {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-soft) 15%, var(--verdigris) 50%, var(--border-soft) 85%, transparent);
  opacity: 0.7;
}

/* ---------- 7. Sections alternées ---------- */
.ej-leitmotive-section,
.ej-quote-section {
  background-color: var(--lit-paper);
}

.ej-timeline-section,
.gallery-section {
  background-color: var(--lit-paper-raised);
}

.ej-drogen-section,
#ressources.gallery-section {
  background-color: var(--lit-paper);
}

/* ---------- 8. Héros ---------- */
.hero-section {
  min-height: min(92vh, 820px);
  background-color: var(--lit-paper);
}

.mb-hero-canvas {
  background-color: var(--bg-secondary);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 22%;
  filter: grayscale(100%) contrast(0.95) brightness(0.94);
}

html[data-theme="light"] .mb-hero-canvas {
  background-image:
    linear-gradient(105deg, rgba(236, 232, 222, 0.94) 0%, rgba(236, 232, 222, 0.78) 32%, rgba(236, 232, 222, 0.42) 58%, rgba(216, 216, 204, 0.55) 100%),
    linear-gradient(0deg, rgba(111, 128, 117, 0.1), transparent 45%),
    image-set(
      url("../images/maurice_bardeche_hero-960.webp") type("image/webp"),
      url("../images/maurice_bardeche_hero.jpg") type("image/jpeg")
    );
}

@media (min-width: 769px) {
  html[data-theme="light"] .mb-hero-canvas {
    background-image:
      linear-gradient(105deg, rgba(236, 232, 222, 0.94) 0%, rgba(236, 232, 222, 0.78) 32%, rgba(236, 232, 222, 0.42) 58%, rgba(216, 216, 204, 0.55) 100%),
      linear-gradient(0deg, rgba(111, 128, 117, 0.1), transparent 45%),
      image-set(
        url("../images/maurice_bardeche_hero-1280.webp") type("image/webp"),
        url("../images/maurice_bardeche_hero.jpg") type("image/jpeg")
      );
  }
}

@media (min-width: 1281px) {
  html[data-theme="light"] .mb-hero-canvas {
    background-image:
      linear-gradient(105deg, rgba(236, 232, 222, 0.94) 0%, rgba(236, 232, 222, 0.78) 32%, rgba(236, 232, 222, 0.42) 58%, rgba(216, 216, 204, 0.55) 100%),
      linear-gradient(0deg, rgba(111, 128, 117, 0.1), transparent 45%),
      image-set(
        url("../images/maurice_bardeche_hero.webp") type("image/webp"),
        url("../images/maurice_bardeche_hero.jpg") type("image/jpeg")
      );
  }
}

html[data-theme="dark"] .mb-hero-canvas {
  background-image:
    linear-gradient(105deg, rgba(47, 58, 52, 0.92) 0%, rgba(47, 58, 52, 0.7) 38%, rgba(47, 58, 52, 0.35) 62%, rgba(47, 58, 52, 0.65) 100%),
    linear-gradient(0deg, rgba(79, 97, 87, 0.15), transparent 50%),
    image-set(
      url("../images/maurice_bardeche_hero-960.webp") type("image/webp"),
      url("../images/maurice_bardeche_hero.jpg") type("image/jpeg")
    );
}

@media (min-width: 769px) {
  html[data-theme="dark"] .mb-hero-canvas {
    background-image:
      linear-gradient(105deg, rgba(47, 58, 52, 0.92) 0%, rgba(47, 58, 52, 0.7) 38%, rgba(47, 58, 52, 0.35) 62%, rgba(47, 58, 52, 0.65) 100%),
      linear-gradient(0deg, rgba(79, 97, 87, 0.15), transparent 50%),
      image-set(
        url("../images/maurice_bardeche_hero-1280.webp") type("image/webp"),
        url("../images/maurice_bardeche_hero.jpg") type("image/jpeg")
      );
  }
}

@media (min-width: 1281px) {
  html[data-theme="dark"] .mb-hero-canvas {
    background-image:
      linear-gradient(105deg, rgba(47, 58, 52, 0.92) 0%, rgba(47, 58, 52, 0.7) 38%, rgba(47, 58, 52, 0.35) 62%, rgba(47, 58, 52, 0.65) 100%),
      linear-gradient(0deg, rgba(79, 97, 87, 0.15), transparent 50%),
      image-set(
        url("../images/maurice_bardeche_hero.webp") type("image/webp"),
        url("../images/maurice_bardeche_hero.jpg") type("image/jpeg")
      );
  }
}

.mb-hero-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--am-grain);
  background-size: 200px 200px;
  opacity: 0.35;
  mix-blend-mode: multiply;
}

.mb-hero-monogram {
  display: none;
}

html[data-theme="light"] .hero-1-content,
html[data-theme="light"] .hero-1-content .heading---h2,
html[data-theme="light"] .hero-1-content .bold-text,
html[data-theme="light"] .hero-1-content .lfc-hero-title-link,
html[data-theme="light"] .hero-1-content .hero-1-title > div {
  color: var(--text-main) !important;
}

html[data-theme="dark"] .hero-1-content,
html[data-theme="dark"] .hero-1-content .heading---h2,
html[data-theme="dark"] .hero-1-content .bold-text,
html[data-theme="dark"] .hero-1-content .lfc-hero-title-link,
html[data-theme="dark"] .hero-1-content .hero-1-title > div {
  color: var(--lit-ink) !important;
}

.hero-1-content .hero-1-title > div {
  font-family: var(--am-sans);
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted) !important;
  max-width: 52ch;
  line-height: 1.65;
}

html[data-theme="light"] .hero-section .button.ej-hero-cta-timeline .button-icon,
html[data-theme="light"] .hero-section .button.ej-hero-cta-interview .button-icon {
  filter: brightness(0) saturate(100%) opacity(0.75);
}

/* ---------- 9. Boutons ---------- */
.button.bg-brand,
.button.bg-brand.w-inline-block {
  background-color: var(--verdigris-dark) !important;
  color: var(--bg-card) !important;
  border: 1px solid var(--verdigris-dark) !important;
  box-shadow: none !important;
  font-family: var(--am-sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
  transition: background-color 0.22s var(--lfc-ease), border-color 0.22s var(--lfc-ease), color 0.22s var(--lfc-ease);
}

.button.bg-brand:hover,
.button.bg-brand:focus-visible {
  background-color: var(--accent-dark) !important;
  border-color: var(--accent-dark) !important;
}

.button .button-hover-element {
  background-color: var(--accent-dark) !important;
}

.hero-section .buttons .button.ej-hero-cta-timeline,
.hero-section .buttons .button.ej-hero-cta-interview {
  background: transparent !important;
  border: 1px solid var(--border-soft) !important;
  color: var(--lead-gray) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .hero-section .buttons .button.ej-hero-cta-timeline,
html[data-theme="dark"] .hero-section .buttons .button.ej-hero-cta-interview {
  border-color: var(--lit-rule) !important;
  color: var(--lit-ink) !important;
}

.hero-section .buttons .button.ej-hero-cta-timeline:hover,
.hero-section .buttons .button.ej-hero-cta-interview:hover {
  background: var(--bg-secondary) !important;
  border-color: var(--verdigris) !important;
}

.gallery-more-button,
.ej-link-card-btn {
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--lead-gray);
  font-family: var(--am-sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: none;
  transition: background-color 0.22s var(--lfc-ease), border-color 0.22s var(--lfc-ease), color 0.22s var(--lfc-ease);
}

.gallery-more-button:hover,
.ej-link-card-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--verdigris);
  color: var(--verdigris-dark);
}

html[data-theme="dark"] .gallery-more-button,
html[data-theme="dark"] .ej-link-card-btn {
  color: var(--lit-ink);
}

html[data-theme="dark"] .gallery-more-button:hover,
html[data-theme="dark"] .ej-link-card-btn:hover {
  background: var(--lit-paper-raised);
  border-color: var(--verdigris);
}

/* ---------- 10. Cartes ---------- */
.ej-leitmotive-card,
.ej-drogen-card,
.ej-link-card {
  background: var(--lit-paper-card) !important;
  border: 1px solid var(--border-soft) !important;
  border-top: 1px solid var(--border-soft) !important;
  box-shadow: none !important;
  border-radius: 1px;
  transition: border-color 0.25s var(--lfc-ease), background-color 0.25s var(--lfc-ease);
}

/* Chronologie : fiche sur .ej-timeline-title uniquement (archive-ux.css) */
.ej-timeline-item {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.ej-leitmotive-card:hover,
.ej-drogen-card:hover,
.ej-link-card:hover {
  transform: none;
  border-color: var(--verdigris) !important;
  box-shadow: none !important;
}

.ej-leitmotive-hud-top,
.ej-drogen-hud-top {
  background: var(--verdigris) !important;
  height: 2px !important;
  opacity: 0.55;
}

.ej-leitmotive-card-title,
.ej-drogen-card-title,
.ej-link-card-title {
  color: var(--lead-gray);
}

html[data-theme="dark"] .ej-leitmotive-card-title,
html[data-theme="dark"] .ej-drogen-card-title,
html[data-theme="dark"] .ej-link-card-title {
  color: var(--lit-ink);
}

/* ---------- 11. Chronologie ---------- */
.ej-timeline-line {
  background: linear-gradient(180deg, transparent, var(--border-soft) 6%, var(--border-soft) 94%, transparent);
}

.ej-timeline-dot {
  background: var(--bg-card) !important;
  border: 2px solid var(--verdigris-dark) !important;
  box-shadow: none !important;
}

.ej-timeline-year {
  color: var(--verdigris-dark);
  font-family: var(--am-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

html[data-theme="dark"] .ej-timeline-year {
  color: var(--lit-accent);
}

.ej-timeline-title {
  font-family: var(--am-sans);
}

.ej-bibliography-item {
  border-bottom-color: var(--border-soft) !important;
}

.ej-bibliography-year {
  color: var(--verdigris-dark);
}

.ej-bibliography-item .book-avatar,
.ej-bibliography-item img.book-avatar {
  border: 1px solid var(--border-soft) !important;
  box-shadow: none !important;
}

.ej-bibliography-item .book-avatar.bibliography-image-clickable:hover {
  border-color: var(--verdigris) !important;
  box-shadow: none !important;
}

/* ---------- 12. Images archive ---------- */
.image-archive,
.gallery-card-image,
.book-avatar:not([src$=".svg"]) {
  filter: grayscale(100%) contrast(0.95) brightness(0.95);
}

.gallery-card {
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  overflow: hidden;
}

.gallery-card::after {
  box-shadow: inset 0 0 40px 8px rgba(47, 58, 52, 0.12);
  background: radial-gradient(120% 120% at 50% 30%, transparent 55%, rgba(47, 58, 52, 0.08));
  opacity: 1;
}

.gallery-card:hover::after {
  opacity: 0.7;
}

.gallery-card:hover .gallery-card-image {
  transform: scale(1.02);
  filter: grayscale(100%) contrast(0.98) brightness(0.98);
}

/* ---------- 13. Citations ---------- */
.mm-citations-section {
  background: var(--bg-card);
  padding: clamp(4.5rem, 10vw, 8rem) 0;
}

.mm-citations-section::before {
  opacity: 0.5;
}

.mm-citations-section .ej-quote-text {
  font-family: var(--am-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.48;
  text-wrap: pretty;
}

html[data-theme="dark"] .mm-citations-section {
  background: var(--lit-paper-card);
}

html[data-theme="dark"] .mm-citations-section .ej-quote-text {
  color: var(--lit-ink);
}

.ej-drogen-quote {
  border-left: 2px solid var(--verdigris);
  padding-left: clamp(1rem, 3vw, 2rem);
}

.mm-citations-section .ej-quote-nav {
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  color: var(--verdigris-dark);
}

.mm-citations-section .ej-quote-nav:hover {
  border-color: var(--verdigris);
  background: var(--bg-secondary);
  color: var(--accent-dark);
  transform: none;
}

.mm-citations-section .ej-quote-dot {
  border-color: var(--stone-gray);
}

.mm-citations-section .ej-quote-dot.active {
  background: var(--verdigris);
  border-color: var(--verdigris);
}

.mm-citations-section .ej-quote-progress {
  background: rgba(111, 128, 117, 0.2);
}

.mm-citations-section .ej-quote-progress-bar {
  background: var(--verdigris);
}

/* ---------- 14. Navigation ---------- */
.navbar {
  background-color: rgba(236, 232, 222, 0.92) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft) !important;
}

html[data-theme="dark"] .navbar {
  background-color: rgba(47, 58, 52, 0.94) !important;
  border-bottom-color: var(--lit-rule) !important;
}

.navbar-bg {
  opacity: 1 !important;
  background: transparent !important;
}

.nav-link,
.text-block-7,
.ej-nav-dropdown-toggle,
.dropdown-toggle {
  color: var(--lead-gray) !important;
  font-family: var(--am-sans);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .text-block-7,
html[data-theme="dark"] .ej-nav-dropdown-toggle {
  color: var(--lit-ink) !important;
}

.nav-link:hover,
.ej-nav-dropdown-link:hover,
.text-block-7:hover,
.dropdown-toggle:hover {
  color: var(--verdigris) !important;
}

.nav-link.w--current {
  color: var(--verdigris-dark) !important;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--verdigris);
}

.ej-nav-dropdown-link {
  color: var(--text-muted) !important;
}

.ej-nav-dropdown-list,
.dropdown-wrap,
.w-dropdown-list {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-soft) !important;
  box-shadow: 0 8px 24px rgba(23, 26, 23, 0.08) !important;
}

html[data-theme="dark"] .ej-nav-dropdown-list,
html[data-theme="dark"] .dropdown-wrap {
  background-color: var(--lit-paper-card) !important;
  border-color: var(--lit-rule) !important;
}

.ej-lang-btn {
  color: var(--text-muted);
  font-family: var(--am-mono);
}

.ej-lang-btn.active {
  color: var(--verdigris-dark);
  border-bottom-color: var(--verdigris);
}

/* ---------- 15. Pied de page ---------- */
.ej-footer {
  background-color: var(--lead-gray) !important;
  border-top: 1px solid var(--accent-dark) !important;
  color: var(--bg-card);
}

.ej-footer-description,
.ej-footer-link a,
.ej-footer-dev-notice,
.ej-footer-rights-text {
  color: rgba(245, 242, 234, 0.88);
  font-family: var(--am-sans);
}

.ej-footer-section-title {
  color: var(--bg-card);
  font-family: var(--am-serif);
  letter-spacing: 0.08em;
}

.ej-footer-link a:hover {
  color: var(--verdigris) !important;
}

.ej-scroll-to-top {
  border: 1px solid var(--stone-gray) !important;
  background: var(--accent-dark) !important;
  color: #ffffff !important;
}

.ej-scroll-to-top::before,
.ej-scroll-to-top::after {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* ---------- 16. Liens & sélection ---------- */
a {
  color: var(--verdigris-dark);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--verdigris);
}

html[data-theme="dark"] a {
  color: var(--lit-accent);
}

.ej-source-note a,
.ej-drogen-intro-text a,
p a {
  color: var(--verdigris-dark);
}

::selection {
  background: rgba(111, 128, 117, 0.35);
  color: var(--text-main);
}

/* ---------- 17. Filtres & formulaires ---------- */
.ej-filter-btn {
  border-color: var(--border-soft) !important;
  color: var(--text-muted) !important;
  font-family: var(--am-sans);
}

.ej-filter-btn.active,
.ej-filter-btn:hover {
  color: var(--verdigris-dark) !important;
  border-color: var(--verdigris) !important;
  background: var(--bg-card) !important;
}

/* ---------- 18. Révélations au défilement ---------- */
@keyframes am-fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mm-in {
  animation: am-fade-up 0.75s var(--lfc-ease) both;
}

[data-theme] .anim-chariot-load,
[data-theme] .anim-chariot-load-delay-1,
[data-theme] .anim-chariot-load-delay-2,
[data-theme] .anim-chariot-load-delay-3 {
  opacity: 1;
  animation: none;
}

/* ---------- 19. Citations slider — lisibilité & largeur ---------- */
/* Annule la mesure 65ch de pleiade-archiv.css sur cette section */
.mm-citations-section .ej-quote-wrapper,
.mm-citations-section .ej-quote-slider {
  max-width: min(1180px, 96vw) !important;
  width: 100%;
}

.mm-citations-section .ej-quote-slider {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: clamp(200px, 22vh, 280px);
  padding-bottom: 0;
}

.mm-citations-section .ej-quote-slider-inner {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: clamp(160px, 18vh, 240px);
  overflow: hidden;
}

.mm-citations-section .ej-quote-item {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 clamp(1.25rem, 5vw, 3.5rem);
  opacity: 0 !important;
  visibility: hidden;
  transform: translateY(14px);
  pointer-events: none;
  transition:
    opacity 0.75s var(--lfc-ease),
    transform 0.75s var(--lfc-ease),
    visibility 0s linear 0.75s;
}

.mm-citations-section .ej-quote-item.mm-in:not(.active) {
  opacity: 0 !important;
  visibility: hidden !important;
  animation: none !important;
}

.mm-citations-section .ej-quote-item.active {
  opacity: 1 !important;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition:
    opacity 0.75s var(--lfc-ease),
    transform 0.75s var(--lfc-ease),
    visibility 0s linear 0s;
}

.mm-citations-section .ej-quote-text {
  font-size: clamp(1.35rem, 2.15vw, 1.85rem);
  max-width: min(82ch, 100%) !important;
  width: 100%;
  margin: 0 auto 1.25rem;
  text-align: center;
  text-wrap: pretty;
}

.mm-citations-section .ej-quote-author {
  font-family: var(--am-sans);
  font-size: clamp(0.7rem, 1.1vw, 0.8rem);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  max-width: min(82ch, 100%);
  margin: 0 auto;
  text-align: center;
  line-height: 1.5;
}

html[data-theme="dark"] .mm-citations-section .ej-quote-author {
  color: var(--lit-ink-muted);
}

.mm-citations-section .ej-quote-controls,
.mm-citations-section .ej-quote-progress,
.mm-citations-section .ej-quote-nav,
.mm-citations-section .ej-quote-dots {
  display: none !important;
}

.mm-citations-section .ej-quote-dot {
  border-radius: 50% !important;
}

@media (max-width: 900px) {
  .mm-citations-section .ej-quote-text {
    font-size: clamp(1.22rem, 3.6vw, 1.55rem);
    max-width: min(72ch, 100%) !important;
    line-height: 1.46;
  }
}

@media (max-width: 767px) {
  .mm-citations-section .ej-quote-text {
    font-size: clamp(1.12rem, 4.5vw, 1.38rem);
    max-width: min(36ch, 100%) !important;
    line-height: 1.44;
  }

  .mm-citations-section .ej-quote-author {
    max-width: min(40ch, 100%);
    font-size: 0.68rem;
  }

  .mm-citations-section .ej-quote-slider {
    min-height: clamp(180px, 24vh, 260px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-in {
    animation: none;
  }

  .mm-citations-section .ej-quote-item {
    transition: opacity 0.2s ease, visibility 0.2s ease;
    transform: none;
  }

  .mm-citations-section .ej-quote-item.active {
    transform: none;
  }

  .mm-citations-section .ej-quote-progress {
    display: none;
  }

  body {
    background-attachment: scroll;
  }
}
