/* Visite guidée : graphiques toujours visibles + Hiroshima progressif */
.visite-page .visite-shell {
  max-width: 44rem;
  margin: 0 auto;
}

.visite-page .visite-progress-block {
  margin: 0 0 0.75rem;
}

.visite-page .visite-progress {
  height: 6px;
  background: var(--border, #e2e8f0);
  border-radius: 999px;
  overflow: hidden;
  margin: 0 0 0.35rem;
}

.visite-page .visite-progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  /* pas de transition CSS : la barre avance en continu via rAF */
  transition: none;
}

.visite-page .visite-progress-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  letter-spacing: 0.02em;
}

.visite-page .visite-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--obs-blue-600, #2563eb);
}

.visite-page .visite-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--obs-blue-800, #1e40af);
}

/* Bloc visuel prioritaire (graphique + pluie) juste sous le titre */
.visite-page .visite-visual {
  margin: 0 0 1rem;
  position: sticky;
  top: 0.35rem;
  z-index: 5;
}

.visite-page .visite-chart-wrap {
  margin: 0;
  padding: 0.55rem 0.65rem 0.45rem;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.visite-page .visite-chart-wrap[hidden] {
  display: none !important;
}

.visite-page .visite-chart-title {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary, #475569);
}

.visite-page .visite-chart {
  display: block;
  width: 100%;
  height: 240px;
  min-height: 200px;
  background: #f8fafc;
  border-radius: 6px;
}

.visite-page .visite-chart-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #9a3412;
}

.visite-page .visite-chart-hint[hidden] {
  display: none !important;
}

/* Glisseur d'année : progression visible */
.visite-page .visite-slider-wrap {
  margin: 0.55rem 0 0.15rem;
  padding: 0.45rem 0.35rem 0.2rem;
  border-top: 1px solid var(--border, #e2e8f0);
}

.visite-page .visite-slider-wrap[hidden] {
  display: none !important;
}

.visite-page .visite-slider-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.visite-page .visite-slider-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary, #475569);
}

.visite-page .visite-slider-value {
  font: 800 1.05rem/1.1 var(--font-mono, ui-monospace, monospace);
  color: #c2410c;
  font-variant-numeric: tabular-nums;
  min-width: 3.2rem;
  text-align: right;
}

/* Slider : design system UX-P1-01 (.visite-year-slider) */

.visite-page .visite-metric__value {
  transition: color 0.15s ease;
}

.visite-page .tw-not-instant {
  margin: 0.5rem 0 0;
  max-width: 36rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  color: #9a3412;
  background: rgba(254, 243, 199, 0.65);
  border-left: 3px solid #ea580c;
  border-radius: 0 6px 6px 0;
}

.visite-page .visite-slider-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.1rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
}

.visite-page .visite-stage-wrap {
  margin: 0.65rem 0 0;
}

.visite-page .visite-stage-wrap[hidden] {
  display: none !important;
}

.visite-page .visite-stage-wrap .bomb-stage {
  min-height: 180px;
  border-radius: 10px;
  border: 1px solid var(--border, #e2e8f0);
  overflow: hidden;
}

.visite-page .visite-bomb-caption {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #9a3412;
  line-height: 1.35;
}

.visite-page .visite-bomb-caption[hidden] {
  display: none !important;
}

.visite-page .visite-live {
  margin: 0.35rem 0 0;
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #1e3a5f;
  background: rgba(37, 99, 235, 0.08);
  border-left: 3px solid var(--obs-blue-600, #2563eb);
  border-radius: 0 6px 6px 0;
}

.visite-page .visite-live[hidden] {
  display: none !important;
}

.visite-page .visite-metric {
  margin: 0 0 0.85rem;
  padding: 0.85rem 1rem;
  background: rgba(37, 99, 235, 0.06);
  border-radius: 10px;
  border-left: 4px solid var(--obs-blue-600, #2563eb);
}

.visite-page .visite-metric[hidden] {
  display: none !important;
}

.visite-page .visite-metric__value {
  font: 800 clamp(1.75rem, 5.5vw, 2.5rem) / 1.1 var(--font-mono, ui-monospace, monospace);
  color: var(--obs-blue-800, #1e40af);
  font-variant-numeric: tabular-nums;
}

.visite-page .visite-metric__unit {
  margin-left: 0.35rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--obs-blue-800, #1e40af);
}

.visite-page .visite-metric__sub {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  color: var(--text-secondary, #475569);
}

.visite-page .visite-year-line {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary, #475569);
}

.visite-page .visite-year-line[hidden] {
  display: none !important;
}

.visite-page .visite-body {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--text, #0f172a);
}

.visite-page .visite-body-toggle {
  appearance: none;
  display: inline-flex;
  margin: 0 0 1rem;
  padding: 0.35rem 0.15rem;
  border: none;
  background: none;
  color: var(--obs-blue-600, #2563eb);
  font: 700 0.88rem/1.2 system-ui, sans-serif;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.visite-page .visite-body-toggle[hidden] {
  display: none !important;
}

.visite-page .visite-end-links {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding: 0.85rem 0.9rem;
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
}

.visite-page .visite-end-links[hidden] {
  display: none !important;
}

.visite-page .visite-end-cta {
  justify-content: center;
  text-align: center;
  text-decoration: none;
}

.visite-page .visite-end-muted {
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  color: var(--text-secondary, #64748b);
  text-decoration: none;
}

.visite-page .visite-end-muted:hover {
  color: var(--obs-blue-600, #2563eb);
  text-decoration: underline;
}

.visite-page .visite-body p {
  margin: 0 0 0.65rem;
}

.visite-page .visite-body p:last-child {
  margin-bottom: 0;
}

.visite-page .visite-body strong {
  font-weight: 700;
  color: var(--obs-blue-800, #1e40af);
}

.visite-page .visite-body em {
  font-style: italic;
  color: #334155;
}

.visite-page .visite-pace-hint {
  margin-top: 0.65rem;
  font-size: 0.92rem;
  color: var(--text-secondary, #64748b);
  font-style: italic;
}

.visite-page .visite-step-list {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
}

.visite-page .visite-step-list li {
  margin: 0.25rem 0;
}

.visite-page .visite-controls {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin-top: 1.25rem;
  padding: 0.75rem 0.65rem 0.55rem;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.04);
  z-index: 8;
}

/* UX-P0-03 : bannière au-dessus du sticky visual pendant hiro* */
.visite-page .h15-ethics-banner {
  top: 0.15rem;
  z-index: 12;
  margin-bottom: 0.65rem;
}

/* Boutons : héritent du design system UX-P1-01 (.btn-primary / .btn-secondary) */

.visite-page .visite-a11y-summary {
  margin: 0 0 0.75rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--text-secondary, #475569);
  background: rgba(15, 23, 42, 0.03);
  border-left: 3px solid var(--border, #cbd5e1);
  border-radius: 0 6px 6px 0;
}

.visite-page .visite-a11y-summary:empty {
  display: none;
}

.visite-page .visite-status {
  font-size: 0.85rem;
  color: var(--text-secondary, #64748b);
}

.visite-page .visite-markers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 0.75rem;
  list-style: none;
  padding: 0;
}

.visite-page .visite-markers button {
  appearance: none;
  border: 1px solid var(--border, #e2e8f0);
  background: #fff;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  cursor: pointer;
}

.visite-page .visite-markers button[aria-current="true"] {
  background: var(--obs-blue-600, #2563eb);
  border-color: var(--obs-blue-800, #1e40af);
  color: #fff;
}

.visite-page .visite-sound-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.visite-page .visite-sound-toggle[hidden] {
  display: none !important;
}

/* Son dans la barre de contrôles (toujours accessible, hors sticky) */
.visite-page .visite-sound-toggle--bar {
  margin: 0 0.35rem 0 0;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  background: #fff7ed;
  font-weight: 700;
  font-size: 0.82rem;
  color: #9a3412;
  flex: 1 1 auto;
  min-width: 10rem;
}

.visite-page .visite-sound-toggle--bar input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #ea580c;
}

/* Étape H15 : pas de sticky (évite superpositions chart/pluie/texte) */
.visite-page.visite-hiro-active .visite-visual,
body.visite-hiro-active .visite-visual {
  position: static;
  z-index: auto;
}

.visite-page.visite-hiro-bombs .visite-chart-wrap,
body.visite-hiro-bombs .visite-chart-wrap {
  display: none !important;
}

.visite-page.visite-hiro-bombs .visite-stage-wrap,
body.visite-hiro-bombs .visite-stage-wrap {
  margin-top: 0.35rem;
}

.visite-page.visite-hiro-bombs .visite-stage-wrap .bomb-stage,
body.visite-hiro-bombs .visite-stage-wrap .bomb-stage {
  min-height: 220px;
}

@media (max-width: 640px) {
  .visite-page.visite-hiro-bombs .visite-stage-wrap .bomb-stage,
  body.visite-hiro-bombs .visite-stage-wrap .bomb-stage {
    min-height: 240px;
  }

  .visite-page .visite-sound-toggle--bar {
    order: -1;
    width: 100%;
    flex: 1 1 100%;
  }
}

/* Mobile HD : graphe plus grand, corps repliable, pas de version SD */
@media (max-width: 640px) {
  .visite-page .visite-chart {
    height: 280px;
    min-height: 260px;
  }

  .visite-page .visite-stage-wrap .bomb-stage {
    min-height: 180px;
  }

  .visite-page .visite-visual {
    top: 0;
  }

  .visite-page .visite-body:not(.is-expanded) {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    font-size: 0.98rem;
  }

  .visite-page .visite-body.is-expanded {
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
  }

  .visite-page .visite-title {
    font-size: clamp(1.25rem, 5vw, 1.55rem);
  }

  .visite-page .visite-metric__value {
    font-size: clamp(1.85rem, 9vw, 2.6rem);
  }
}

/* Mode lecture calme / reduced motion : pas de sticky qui cache le texte */
@media (prefers-reduced-motion: reduce) {
  .visite-page .visite-visual {
    position: static;
  }

  .visite-page .visite-progress__fill {
    transition: none;
  }
}
