/* ==========================================================================
   STYLE — LE DOSSIER DU SOUFFLE (v2.0 — Refonte UI/UX)
   Fidèle au thème Veilleur des Brumes (style.css) :
   encre nocturne, lueur de lanterne dorée, brume céleste, verre dépoli.
   ========================================================================== */

[hidden] {
  display: none !important;
}

/* ---------- Fil de progression de lecture ---------- */
.reading-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  background: rgba(12, 23, 31, 0.45);
  pointer-events: none;
}

.reading-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--mist-blue) 0%, var(--gold) 55%, var(--gold-glow) 100%);
  box-shadow: 0 0 10px rgba(255, 209, 107, 0.55);
  transition: width 0.12s linear;
}

/* ---------- Ambiance dynamique selon le pôle de l'interrupteur ---------- */
body[data-pole="science"] .ambient-glow {
  background: radial-gradient(circle, rgba(181, 201, 214, 0.1) 0%, rgba(179, 198, 171, 0.04) 45%, transparent 70%);
}

body[data-pole="spiritual"] .ambient-glow {
  background: radial-gradient(circle, rgba(255, 209, 107, 0.1) 0%, rgba(217, 191, 136, 0.04) 45%, transparent 70%);
}

/* ---------- Compatibilité iOS Safari & Android Chrome ---------- */
body {
  /* Préserve position: sticky sur iOS Safari (contrairement à overflow-x: hidden) */
  overflow-x: clip;
  -webkit-tap-highlight-color: rgba(217, 191, 136, 0.14);
}

button,
a,
input[type="range"],
select {
  touch-action: manipulation;
}

.dock-chapters-row,
.table-scroll,
.matrix-scroll {
  -webkit-overflow-scrolling: touch;
}

/* ---------- Conteneur de lecture ---------- */
.dossier-main {
  max-width: 960px;
  width: 100%;
  min-width: 0;
  padding: 28px 20px max(68px, calc(48px + env(safe-area-inset-bottom)));
}

.dossier-hero,
.dossier-dock,
.pole-panel,
.doc-card,
.matrix-section,
.matrix-card,
.sources-dropdown-section,
.sources-dropdown {
  min-width: 0;
  max-width: 100%;
}

/* ---------- Bouton retour sanctuaire (header) ---------- */
.back-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(21, 35, 44, 0.82);
  border: 1px solid var(--line-strong);
  color: var(--gold);
  padding: 9px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}

.back-pill .back-label-short {
  display: none;
}

.back-pill svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  flex-shrink: 0;
}

.back-pill:hover {
  background: rgba(217, 191, 136, 0.14);
  border-color: var(--gold);
  color: var(--gold-glow);
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(255, 209, 107, 0.18);
}

/* ---------- Hero & Sceau du Veilleur ---------- */
.dossier-hero {
  text-align: center;
  margin-bottom: 24px;
  padding: 6px 8px 4px;
  width: 100%;
}

.brand-seal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 12px;
  border-radius: var(--radius-full);
  background: rgba(21, 35, 44, 0.72);
  border: 1px solid var(--line-strong);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25), inset 0 0 14px rgba(255, 209, 107, 0.05);
  margin-bottom: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.brand-seal-lantern {
  width: 22px;
  height: 28px;
  color: var(--gold);
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(255, 209, 107, 0.45));
}

.brand-seal-text {
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}

.dossier-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--cream);
  line-height: 1.15;
  margin-bottom: 12px;
  text-shadow: 0 0 28px rgba(255, 209, 107, 0.18);
}

.dossier-subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.04rem;
  color: var(--muted);
  max-width: 660px;
  margin: 0 auto 18px;
  line-height: 1.62;
}

.hero-metrics {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 18px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  background: rgba(16, 29, 37, 0.65);
  border: 1px solid var(--line);
  font-size: 0.76rem;
  color: var(--muted);
}

.hero-metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-metric strong {
  color: var(--gold);
  font-weight: 600;
}

.hero-metric-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.45;
}

/* ==========================================================================
   DOCK FLOTTANT : INTERRUPTEUR & NAVIGATION RAPIDE
   ========================================================================== */

.dossier-dock {
  position: sticky;
  top: 10px;
  z-index: 30;
  width: 100%;
  background: rgba(16, 29, 37, 0.88);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 28px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dock-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
}

/* ---------- L'Interrupteur Scientifique <-> Spirituel ---------- */
.pole-switch-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(12, 23, 31, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 5px 7px;
  max-width: 100%;
}

.pole-label-btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 6px 13px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.pole-label-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  flex-shrink: 0;
}

.pole-label-btn:hover {
  color: var(--cream);
}

.pole-label-btn.is-active[data-pole-target="science"] {
  color: var(--mist-blue);
  background: rgba(181, 201, 214, 0.12);
  border-color: rgba(181, 201, 214, 0.35);
  box-shadow: 0 0 14px rgba(181, 201, 214, 0.12);
}

.pole-label-btn.is-active[data-pole-target="spiritual"] {
  color: var(--gold-glow);
  background: rgba(217, 191, 136, 0.14);
  border-color: rgba(217, 191, 136, 0.42);
  box-shadow: 0 0 14px rgba(255, 209, 107, 0.16);
}

/* Interrupteur physique central */
.pole-toggle-track {
  position: relative;
  width: 58px;
  height: 30px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-strong);
  background: rgba(21, 35, 44, 0.95);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: var(--transition);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

.pole-toggle-track:hover {
  border-color: var(--gold);
}

.pole-toggle-track:focus-visible,
.pole-label-btn:focus-visible,
.dock-action-pill:focus-visible,
.chapter-pill:focus-visible,
.mx-cell.has-link:focus-visible,
.sources-trigger:focus-visible {
  outline: 2px solid var(--gold-glow);
  outline-offset: 2px;
}

.pole-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(135deg, var(--mist-blue), #7fa3b8);
  box-shadow: 0 0 10px rgba(181, 201, 214, 0.55);
}

.pole-toggle-track[aria-checked="true"] .pole-toggle-thumb {
  transform: translateX(28px);
  background: linear-gradient(135deg, var(--gold-glow), var(--gold-deep));
  box-shadow: 0 0 12px rgba(255, 209, 107, 0.65);
}

/* Raccourcis utilitaires à droite du dock */
.dock-utilities {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-left: auto;
}

.dock-action-pill {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(21, 35, 44, 0.78);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.dock-action-pill svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  flex-shrink: 0;
}

.dock-action-pill:hover {
  border-color: var(--gold);
  color: var(--gold-glow);
  background: rgba(217, 191, 136, 0.1);
}

.dock-action-pill.is-open {
  border-color: var(--gold);
  color: var(--gold-glow);
  background: rgba(217, 191, 136, 0.16);
}

/* ---------- Barre de chapitres dynamique ---------- */
.dock-chapters-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(213, 219, 220, 0.1);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.dock-chapters-row::-webkit-scrollbar {
  display: none;
}

.chapter-pill {
  background: rgba(12, 23, 31, 0.65);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: var(--radius-full);
  padding: 4px 11px;
  font-size: 0.74rem;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}

.chapter-pill:hover {
  border-color: rgba(217, 191, 136, 0.5);
  color: var(--cream);
}

.chapter-pill.is-active {
  border-color: var(--gold);
  color: var(--gold-glow);
  background: rgba(217, 191, 136, 0.14);
}

/* ==========================================================================
   PANNEAUX À INTERRUPTEUR (SCIENCE / SPIRITUALITÉ)
   ========================================================================== */

.pole-panel {
  width: 100%;
  display: none;
  animation: panelFadeIn 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

.pole-panel.is-active {
  display: block;
}

@keyframes panelFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- En-tête de partie ---------- */
.part-banner {
  text-align: center;
  margin: 12px 0 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(217, 191, 136, 0.28);
  position: relative;
  scroll-margin-top: 138px;
}

.part-banner::after {
  content: '✦';
  position: absolute;
  bottom: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--gold);
  font-size: 0.88rem;
  padding: 0 12px;
}

.part-banner .part-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--gold);
  opacity: 0.85;
  margin-bottom: 6px;
}

.part-banner h2 {
  font-family: var(--serif);
  font-size: clamp(1.38rem, 3.6vw, 1.88rem);
  font-weight: 400;
  color: var(--cream);
  line-height: 1.25;
}

.part-title-portal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
}

.portal-inline-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px 4px 8px;
  border-radius: var(--radius-full);
  background: rgba(217, 191, 136, 0.08);
  border: 1px solid rgba(217, 191, 136, 0.34);
  font-size: 0.69rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  line-height: 1.2;
}

.portal-inline-lantern {
  width: 15px;
  height: 19px;
  color: var(--gold);
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(255, 209, 107, 0.42));
}

.part-banner .part-sub {
  display: block;
  margin-top: 8px;
  font-size: 0.84rem;
  font-style: italic;
  color: var(--muted);
}

/* ---------- Barre méthodologie & niveaux de preuve (compacte + dépliable) ---------- */
.method-strip {
  background: rgba(18, 32, 42, 0.75);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 22px;
}

.method-strip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.tier-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--muted);
}

.method-toggle-btn {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(217, 191, 136, 0.08);
  border: 1px solid var(--line-strong);
  color: var(--gold);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.74rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.method-toggle-btn:hover {
  background: rgba(217, 191, 136, 0.16);
  color: var(--gold-glow);
}

.method-toggle-btn svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: transform 0.3s ease;
}

.method-toggle-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.method-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.method-details.is-open {
  grid-template-rows: 1fr;
}

.method-details-inner {
  overflow: hidden;
}

.method-details-inner p {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  line-height: 1.65;
  color: var(--cream);
  opacity: 0.92;
}

/* ---------- Cartes de section ---------- */
.doc-card {
  background: rgba(18, 32, 42, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  margin-bottom: 22px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.34);
  scroll-margin-top: 138px;
  transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.doc-card:hover {
  border-color: rgba(217, 191, 136, 0.28);
}

.doc-card.pulse-highlight {
  animation: cardPulseHighlight 1.8s ease;
}

@keyframes cardPulseHighlight {
  0% {
    border-color: var(--gold-glow);
    box-shadow: 0 0 0 3px rgba(255, 209, 107, 0.25), 0 12px 36px rgba(255, 209, 107, 0.2);
  }
  100% {
    border-color: var(--line);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.34);
  }
}

.doc-card h3 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.16rem;
  font-weight: 400;
  color: var(--gold);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.doc-card h3 .card-num {
  font-family: var(--sans);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.78;
}

.doc-card h4 {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 400;
  color: var(--mist-blue);
  margin: 20px 0 8px;
}

.doc-card h4:first-of-type {
  margin-top: 6px;
}

.doc-card p {
  font-size: 0.92rem;
  line-height: 1.72;
  color: var(--cream);
  opacity: 0.94;
  margin-bottom: 12px;
}

.doc-card p:last-child {
  margin-bottom: 0;
}

.doc-card strong {
  color: var(--gold-glow);
  font-weight: 600;
}

.doc-card cite {
  font-style: normal;
  font-size: 0.83em;
  color: var(--mist-blue);
  opacity: 0.9;
}

/* ---------- Badges de preuve ---------- */
.tier-badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid;
  white-space: normal;
  max-width: 100%;
  line-height: 1.35;
}

.tier-1 {
  color: var(--sage);
  border-color: rgba(179, 198, 171, 0.5);
  background: rgba(179, 198, 171, 0.08);
}

.tier-2 {
  color: var(--gold-glow);
  border-color: rgba(255, 209, 107, 0.45);
  background: rgba(255, 209, 107, 0.07);
}

.tier-3 {
  color: #d8aeae;
  border-color: rgba(216, 174, 174, 0.45);
  background: rgba(216, 174, 174, 0.07);
}

/* ---------- Chiffres clés & Spectre de fréquence (S1) ---------- */
.key-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 14px 0 18px;
}

.key-stat-box {
  background: rgba(12, 23, 31, 0.68);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.key-stat-val {
  display: block;
  font-family: var(--serif);
  font-size: 1.18rem;
  color: var(--gold-glow);
  margin-bottom: 3px;
}

.key-stat-label {
  display: block;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--muted);
}

.freq-spectrum-card {
  background: rgba(12, 23, 31, 0.65);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px 12px;
  margin-bottom: 16px;
}

.freq-spectrum-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mist-blue);
  margin-bottom: 8px;
}

.freq-spectrum-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Simulateur interactif de fréquence (S1) ---------- */
.freq-sim-controls {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(213, 219, 220, 0.12);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.freq-sim-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.freq-sim-live-val {
  font-family: var(--serif);
  font-size: 0.96rem;
  color: var(--gold-glow);
}

.freq-sim-hz {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--mist-blue);
  margin-left: 6px;
}

.freq-sim-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.freq-sim-preset-btn {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(21, 35, 44, 0.8);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: var(--transition);
}

.freq-sim-preset-btn:hover,
.freq-sim-preset-btn.is-active {
  border-color: var(--gold);
  color: var(--gold-glow);
  background: rgba(217, 191, 136, 0.12);
}

.freq-sim-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 32px;
  background: transparent;
  cursor: pointer;
}

.freq-sim-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(213, 219, 220, 0.22);
}

.freq-sim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold-glow);
  border: 2px solid var(--deep);
  box-shadow: 0 0 10px rgba(255, 209, 107, 0.55);
  margin-top: -8px;
  transition: transform 0.15s ease;
}

.freq-sim-slider::-moz-range-track {
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(213, 219, 220, 0.22);
}

.freq-sim-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gold-glow);
  border: 2px solid var(--deep);
  box-shadow: 0 0 10px rgba(255, 209, 107, 0.55);
}

.freq-sim-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.freq-sim-readout {
  flex: 1 1 280px;
  font-size: 0.81rem;
  line-height: 1.5;
  color: var(--cream);
  opacity: 0.92;
}

.freq-sim-readout strong {
  color: var(--sage);
}

.freq-sim-readout.zone-low strong {
  color: #d8aeae;
}

.freq-sim-readout.zone-high strong {
  color: var(--mist-blue);
}

.sanctuary-launch-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(217, 191, 136, 0.14);
  border: 1px solid var(--line-strong);
  color: var(--gold-glow);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  font-size: 0.77rem;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
}

.sanctuary-launch-pill:hover {
  background: rgba(217, 191, 136, 0.24);
  border-color: var(--gold-glow);
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(255, 209, 107, 0.2);
}

.sanctuary-launch-pill svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  flex-shrink: 0;
}

.sanctuary-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(213, 219, 220, 0.1);
}

/* ---------- Mode Synthèse rapide vs Lecture intégrale ---------- */
.summary-digest {
  display: none;
  font-size: 0.88rem;
  line-height: 1.62;
  color: var(--mist-blue);
  background: rgba(181, 201, 214, 0.06);
  border-left: 2px solid var(--mist-blue);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 14px;
  margin-bottom: 10px;
}

body.mode-summary .summary-digest {
  display: block;
}

body.mode-summary .detail-only {
  display: none !important;
}

/* ---------- Listes ---------- */
.doc-list {
  list-style: none;
  margin: 8px 0 14px;
  padding: 0;
}

.doc-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  line-height: 1.68;
  color: var(--cream);
  opacity: 0.94;
}

.doc-list li:last-child {
  margin-bottom: 0;
}

.doc-list li::before {
  content: '✦';
  position: absolute;
  left: 2px;
  top: 0;
  color: var(--gold);
  font-size: 0.72rem;
  opacity: 0.85;
}

.doc-list.good li::before {
  content: '◈';
  color: var(--sage);
}

.doc-list.bad li::before {
  content: '◇';
  color: #d8aeae;
}

.list-caption {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--mist-blue);
  margin: 0 0 10px;
  font-weight: 600;
}

.list-caption.good {
  color: var(--sage);
}

.list-caption.bad {
  color: #d8aeae;
}

/* ---------- Grilles comparatives & Bilan ---------- */
.compare-grid,
.verdict-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.compare-col,
.verdict-box {
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 0.88rem;
  line-height: 1.66;
}

.compare-col.good,
.verdict-box.good {
  background: rgba(179, 198, 171, 0.06);
  border: 1px solid rgba(179, 198, 171, 0.34);
}

.compare-col.bad,
.verdict-box.bad {
  background: rgba(216, 174, 174, 0.05);
  border: 1px solid rgba(216, 174, 174, 0.32);
}

.verdict-box h5 {
  font-family: var(--serif);
  font-size: 0.94rem;
  font-weight: 400;
  margin-bottom: 10px;
}

.verdict-box.good h5 {
  color: var(--sage);
}

.verdict-box.bad h5 {
  color: #d8aeae;
}

.verdict-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.verdict-box li {
  padding-left: 18px;
  position: relative;
  margin-bottom: 7px;
  opacity: 0.94;
}

.verdict-box.good li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--sage);
  font-size: 0.82rem;
}

.verdict-box.bad li::before {
  content: '✕';
  position: absolute;
  left: 0;
  color: #d8aeae;
  font-size: 0.82rem;
}

.takeaway-banner {
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  background: rgba(217, 191, 136, 0.07);
  border: 1px solid rgba(217, 191, 136, 0.28);
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--cream);
}

/* ---------- Parcours de lecture recommandé (S8) ---------- */
.reading-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.path-step {
  font-size: 0.78rem;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  background: rgba(16, 29, 37, 0.78);
  border: 1px solid var(--line);
  color: var(--mist-blue);
}

.path-arrow {
  color: var(--gold);
  opacity: 0.7;
  font-size: 0.82rem;
}

/* ---------- Blocs de citation ---------- */
.quote-block {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.72;
  color: var(--cream);
  background: rgba(255, 209, 107, 0.05);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 15px 20px;
  margin: 0 0 22px;
}

.doc-card .quote-block {
  margin: 14px 0 4px;
}

.quote-block .quote-source {
  display: block;
  margin-top: 8px;
  font-size: 0.8rem;
  font-style: normal;
  color: var(--gold);
  opacity: 0.92;
}

/* ---------- Tableaux pneumatologie ---------- */
.table-scroll {
  overflow-x: auto;
  margin: 12px 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  font-size: 0.84rem;
}

.doc-table th {
  text-align: left;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  background: rgba(12, 23, 31, 0.9);
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}

.doc-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.56;
  color: var(--cream);
  opacity: 0.94;
}

.doc-table tr:last-child td {
  border-bottom: none;
}

.doc-table tr:hover td {
  background: rgba(217, 191, 136, 0.04);
}

.doc-table .cell-symbol {
  font-family: var(--serif);
  color: var(--gold-glow);
}

.doc-table .cell-id {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.66rem;
  color: var(--muted);
  opacity: 0.78;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  padding: 1px 8px;
  margin-top: 5px;
  letter-spacing: 0.04em;
}

/* ---------- Filtre & Grille des traditions (T2) ---------- */
.tradition-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 6px 0 16px;
}

.tradition-filter-pill {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(12, 23, 31, 0.7);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.76rem;
  cursor: pointer;
  transition: var(--transition);
}

.tradition-filter-pill:hover {
  border-color: rgba(217, 191, 136, 0.45);
  color: var(--cream);
}

.tradition-filter-pill.is-active {
  background: rgba(217, 191, 136, 0.16);
  border-color: var(--gold);
  color: var(--gold-glow);
}

.traditions-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.tradition-block {
  background: rgba(12, 23, 31, 0.56);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  transition: var(--transition);
}

.tradition-block[hidden] {
  display: none;
}

.tradition-block:hover {
  border-color: rgba(217, 191, 136, 0.34);
}

.tradition-block h4 {
  margin-top: 0 !important;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tradition-area-tag {
  font-family: var(--sans);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  border: 1px solid rgba(217, 191, 136, 0.3);
  border-radius: var(--radius-full);
  padding: 2px 9px;
}

/* ---------- Grilles Isomorphismes & Bibliographie ---------- */
.iso-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.iso-item {
  background: rgba(12, 23, 31, 0.58);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 0.87rem;
  line-height: 1.62;
  color: var(--cream);
}

.iso-item strong {
  display: block;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 0.96rem;
  color: var(--gold-glow);
  margin-bottom: 5px;
}

.iso-count {
  display: inline-block;
  margin-top: 7px;
  font-size: 0.72rem;
  color: var(--mist-blue);
  background: rgba(181, 201, 214, 0.08);
  border: 1px solid rgba(181, 201, 214, 0.22);
  border-radius: var(--radius-full);
  padding: 2px 9px;
}

.biblio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
}

.biblio-grid li {
  background: rgba(12, 23, 31, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--cream);
}

/* ---------- Note ---------- */
.doc-note {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.62;
  padding: 12px 16px;
  border-left: 2px solid var(--line-strong);
  margin-top: 12px;
  opacity: 0.88;
}

/* ==========================================================================
   MATRICE DE RELATIONS INTERACTIVE (SCIENCE <-> TRADITIONS)
   ========================================================================== */

.matrix-section {
  width: 100%;
  margin-top: 28px;
  scroll-margin-top: 138px;
}

.matrix-card {
  background: rgba(18, 32, 42, 0.9);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.38);
}

.matrix-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.matrix-kicker {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 4px;
}

.matrix-title {
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 400;
  color: var(--cream);
}

.matrix-subtitle {
  font-size: 0.83rem;
  color: var(--muted);
  margin-top: 4px;
}

.matrix-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.mx-filter-btn {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(12, 23, 31, 0.72);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mx-filter-btn:hover {
  border-color: rgba(217, 191, 136, 0.45);
  color: var(--cream);
}

.mx-filter-btn.is-active {
  border-color: var(--gold);
  color: var(--gold-glow);
  background: rgba(217, 191, 136, 0.14);
}

/* Grille 2D de la matrice */
.matrix-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(12, 23, 31, 0.55);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.matrix-table th,
.matrix-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid rgba(213, 219, 220, 0.08);
  padding: 10px 10px;
  text-align: center;
  vertical-align: middle;
}

.matrix-table th:last-child,
.matrix-table td:last-child {
  border-right: none;
}

.matrix-table tr:last-child td,
.matrix-table tr:last-child th {
  border-bottom: none;
}

.matrix-table thead th {
  background: rgba(16, 29, 37, 0.94);
  font-family: var(--serif);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--gold);
  padding: 12px 10px;
}

.matrix-table thead th:first-child {
  font-family: var(--sans);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-align: left;
  padding-left: 14px;
}

.matrix-row-head {
  text-align: left !important;
  padding: 12px 14px !important;
  background: rgba(16, 29, 37, 0.72);
  font-size: 0.8rem;
  color: var(--cream);
  font-weight: 500;
  min-width: 185px;
}

.matrix-row-sub {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}

/* Cellules interactives */
.mx-cell-empty {
  color: rgba(177, 186, 192, 0.25);
  font-size: 0.9rem;
  user-select: none;
}

.mx-cell {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(21, 35, 44, 0.6);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: var(--transition);
  color: var(--cream);
}

.mx-cell-glyph {
  font-size: 0.95rem;
  line-height: 1;
}

.mx-cell-tag {
  font-size: 0.67rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.mx-cell[data-kind="bridge"] {
  border-color: rgba(179, 198, 171, 0.42);
  background: rgba(179, 198, 171, 0.08);
  color: var(--sage);
}

.mx-cell[data-kind="converge"] {
  border-color: rgba(255, 209, 107, 0.36);
  background: rgba(255, 209, 107, 0.07);
  color: var(--gold-glow);
}

.mx-cell[data-kind="gap"] {
  border-color: rgba(181, 201, 214, 0.38);
  background: rgba(181, 201, 214, 0.08);
  color: var(--mist-blue);
}

.mx-cell[data-kind="refute"] {
  border-color: rgba(216, 174, 174, 0.38);
  background: rgba(216, 174, 174, 0.08);
  color: #d8aeae;
}

.mx-cell:hover {
  transform: translateY(-1px);
  filter: brightness(1.14);
}

.mx-cell.is-selected {
  box-shadow: 0 0 0 2px var(--gold-glow), 0 6px 18px rgba(0, 0, 0, 0.35);
  transform: scale(1.02);
}

.mx-cell.is-dimmed {
  opacity: 0.22;
  filter: grayscale(0.4);
}

/* ---------- Inspecteur de Relation ---------- */
.matrix-inspector {
  margin-top: 16px;
  background: rgba(12, 23, 31, 0.78);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: var(--transition);
}

.inspector-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.inspector-title {
  font-family: var(--serif);
  font-size: 1.06rem;
  color: var(--cream);
}

.inspector-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid;
}

.inspector-badge[data-kind="bridge"] {
  color: var(--sage);
  border-color: rgba(179, 198, 171, 0.5);
  background: rgba(179, 198, 171, 0.1);
}

.inspector-badge[data-kind="converge"] {
  color: var(--gold-glow);
  border-color: rgba(255, 209, 107, 0.48);
  background: rgba(255, 209, 107, 0.1);
}

.inspector-badge[data-kind="gap"] {
  color: var(--mist-blue);
  border-color: rgba(181, 201, 214, 0.48);
  background: rgba(181, 201, 214, 0.1);
}

.inspector-badge[data-kind="refute"] {
  color: #d8aeae;
  border-color: rgba(216, 174, 174, 0.48);
  background: rgba(216, 174, 174, 0.1);
}

.inspector-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.inspector-col {
  background: rgba(21, 35, 44, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.inspector-col-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 5px;
}

.inspector-col.science .inspector-col-label {
  color: var(--mist-blue);
}

.inspector-col.spiritual .inspector-col-label {
  color: var(--gold);
}

.inspector-col p {
  font-size: 0.85rem;
  line-height: 1.58;
  color: var(--cream);
  opacity: 0.94;
}

.inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inspector-jump-btn {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(21, 35, 44, 0.85);
  border: 1px solid var(--line-strong);
  color: var(--gold);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: var(--transition);
}

.inspector-jump-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.inspector-jump-btn:hover {
  background: rgba(217, 191, 136, 0.14);
  border-color: var(--gold);
  color: var(--gold-glow);
}

/* ==========================================================================
   DROPDOWN MENU — DISPONIBILITÉ DES SOURCES (ZÉRO POLLUTION)
   ========================================================================== */

.sources-dropdown-section {
  width: 100%;
  margin-top: 24px;
  scroll-margin-top: 138px;
}

.sources-dropdown {
  background: rgba(18, 32, 42, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s ease;
}

.sources-dropdown.is-open {
  border-color: var(--line-strong);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.36);
}

.sources-trigger {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  text-align: left;
  color: var(--cream);
  transition: background 0.25s ease;
}

.sources-trigger:hover {
  background: rgba(217, 191, 136, 0.05);
}

.sources-trigger-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.sources-trigger-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(217, 191, 136, 0.1);
  border: 1px solid var(--line-strong);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sources-trigger-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.sources-trigger-title {
  display: block;
  font-family: var(--serif);
  font-size: 1.04rem;
  color: var(--gold);
}

.sources-trigger-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.sources-trigger-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sources-count-pill {
  font-size: 0.72rem;
  color: var(--mist-blue);
  background: rgba(181, 201, 214, 0.1);
  border: 1px solid rgba(181, 201, 214, 0.25);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  white-space: nowrap;
}

.sources-chevron {
  width: 18px;
  height: 18px;
  stroke: var(--gold);
  stroke-width: 2;
  fill: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.sources-dropdown.is-open .sources-chevron {
  transform: rotate(180deg);
}

/* Panneau du dropdown */
.sources-drawer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sources-dropdown.is-open .sources-drawer {
  grid-template-rows: 1fr;
}

.sources-drawer-inner {
  overflow: hidden;
}

.sources-drawer-content {
  padding: 4px 22px 22px;
  border-top: 1px solid var(--line);
}

.sources-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0 14px;
}

.sources-select {
  flex: 1 1 230px;
  background-color: rgba(12, 23, 31, 0.92);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23d9bf88' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--cream);
  padding: 10px 34px 10px 12px;
  font-family: var(--sans);
  font-size: 0.88rem;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.sources-select:focus,
.sources-search:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(217, 191, 136, 0.22);
}

.sources-search {
  flex: 1 1 220px;
  background: rgba(12, 23, 31, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--cream);
  padding: 9px 12px;
  font-family: var(--sans);
  font-size: 0.84rem;
}

.sources-search::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.sources-group-title {
  font-family: var(--serif);
  font-size: 0.96rem;
  color: var(--mist-blue);
  margin: 16px 0 8px;
}

.sources-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.src-item {
  background: rgba(12, 23, 31, 0.62);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.83rem;
  line-height: 1.58;
  color: var(--cream);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.src-item[hidden] {
  display: none;
}

.src-item-text em {
  font-style: normal;
  color: var(--mist-blue);
  font-size: 0.88em;
}

.doi {
  font-family: 'Cascadia Code', 'SF Mono', Consolas, monospace;
  font-size: 0.78em;
  color: var(--gold);
  opacity: 0.9;
}

.doi-link {
  font-family: 'Cascadia Code', 'SF Mono', Consolas, monospace;
  font-size: 0.78em;
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px dashed rgba(217, 191, 136, 0.45);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.doi-link:hover {
  color: var(--gold-glow);
  border-bottom-color: var(--gold-glow);
}

.src-copy-btn {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(21, 35, 44, 0.85);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: var(--radius-full);
  padding: 3px 9px;
  font-size: 0.69rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--transition);
}

.src-copy-btn:hover {
  border-color: var(--gold);
  color: var(--gold-glow);
}

.src-copy-btn.is-copied {
  border-color: var(--sage);
  color: var(--sage);
}

.sources-empty-msg {
  padding: 16px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--muted);
  font-style: italic;
}

/* ---------- CTA final & Retour en haut ---------- */
.cta-sanctuary {
  text-align: center;
  margin: 36px 0 6px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.cta-sanctuary a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--gold-glow);
  text-decoration: none;
  border: 1px solid var(--line-strong);
  background: rgba(217, 191, 136, 0.1);
  padding: 13px 26px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.cta-sanctuary a:hover {
  background: rgba(217, 191, 136, 0.18);
  box-shadow: 0 0 24px rgba(255, 209, 107, 0.24);
  transform: translateY(-2px);
}

.cta-sanctuary a svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.scroll-top-btn {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 40;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(18, 32, 42, 0.9);
  border: 1px solid var(--line-strong);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.scroll-top-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  border-color: var(--gold-glow);
  color: var(--gold-glow);
  transform: translateY(-2px);
}

.scroll-top-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .dock-top-row {
    justify-content: center;
  }

  .dock-utilities {
    margin-left: 0;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .dossier-main {
    padding: 20px 14px 56px;
  }

  .header-center-block {
    display: none;
  }

  .dossier-dock {
    top: 6px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
  }

  .pole-switch-group {
    width: 100%;
    justify-content: space-between;
    gap: 6px;
    padding: 4px 6px;
  }

  .pole-label-btn {
    padding: 6px 8px;
    font-size: 0.73rem;
    flex: 1;
    min-width: 0;
    justify-content: center;
  }

  .pole-toggle-track {
    width: 46px;
    height: 26px;
  }

  .pole-toggle-thumb {
    width: 18px;
    height: 18px;
  }

  .pole-toggle-track[aria-checked="true"] .pole-toggle-thumb {
    transform: translateX(20px);
  }

  .dock-utilities {
    width: 100%;
    justify-content: center;
  }

  .key-stats-row {
    grid-template-columns: 1fr;
  }

  .doc-card,
  .matrix-card {
    padding: 18px 16px;
    scroll-margin-top: 165px;
  }

  .sources-trigger {
    padding: 14px 16px;
  }

  .sources-drawer-content {
    padding: 4px 16px 18px;
  }

  .sources-count-pill {
    display: none;
  }

  .src-item {
    flex-direction: column;
    gap: 8px;
  }

  .back-pill {
    padding: 7px 12px;
    font-size: 0.74rem;
  }
}

@media (max-width: 520px) {
  .back-pill .back-label-long {
    display: none;
  }

  .back-pill .back-label-short {
    display: inline;
  }

  .brand-seal {
    padding: 6px 12px 6px 10px;
    gap: 8px;
  }

  .brand-seal-text {
    font-size: 0.64rem;
    letter-spacing: 0.1em;
  }

  .hero-metrics {
    border-radius: var(--radius-md);
    padding: 8px 12px;
    gap: 6px 14px;
    font-size: 0.72rem;
  }

  .hero-metric-sep {
    display: none;
  }

  .pole-label-btn svg {
    display: none;
  }

  .pole-label-btn {
    font-size: 0.69rem;
    padding: 5px 6px;
    white-space: normal;
    line-height: 1.2;
    text-align: center;
  }

  .freq-sim-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .freq-sim-readout {
    flex: 0 0 auto;
  }

  .sanctuary-launch-pill {
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
    font-size: 0.82rem;
  }
}

/* Empêche le zoom auto iOS Safari sur focus des champs tactiles */
@media (max-width: 1024px) {
  .sources-select,
  .sources-search {
    font-size: 16px;
  }
}

/* Évite que le dock sticky occupe trop de hauteur en paysage smartphone */
@media (max-height: 500px) and (max-width: 960px) {
  .dossier-dock {
    position: static;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
