/* Présentation des quatre étapes (presentation.html). Les titres se lisent depuis le fond d'une salle. */

body.deck-page { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); height: 100dvh; }
body.is-deck .site-header { display: none; }
.deck-page .site-header { grid-row: 1; }
.deck-page .deck { grid-row: 2; }
.deck-page .deck-bar { grid-row: 3; }
.deck { touch-action: pan-y; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(1rem, 3vw, 3rem); align-items: center; min-height: 0; padding: clamp(.75rem, 2.5vh, 2rem) clamp(1rem, 4vw, 4rem); overflow: auto; }
.deck[data-visual="title"] { grid-template-columns: minmax(0, 60rem); justify-content: center; text-align: center; }
.deck-visual { height: 100%; min-height: 0; min-width: 0; display: grid; align-items: center; }
.deck[data-visual="title"] .deck-graph { display: none; }
.deck-graph { display: flex; gap: clamp(.5rem, 1.5vw, 1.5rem); height: 100%; min-height: 0; min-width: 0; }
.deck-graph .deck-visual { flex: 1 1 auto; }
.deck-events { padding-top: .8rem; border-top: 1px solid var(--rule); }
.deck-events-title { font-size: .9375rem; font-weight: 700; color: var(--ink-soft); }
.deck-events ol { list-style: none; display: grid; gap: .35rem; margin: .4rem 0 0; padding: 0; font-size: clamp(.9375rem, 1.2vw, 1.15rem); }
.deck-events li { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: .75rem; }
.deck-events li b { font-weight: 600; font-variant-numeric: tabular-nums; }
.deck-events li.is-new { font-weight: 700; color: var(--accent-strong); }
.deck-events li.is-next { color: var(--ink-faint); }
.deck-events li.is-next span::after { content: " (plus haut)"; }
.deck-visual .stage { height: 100%; min-height: 260px; width: 100%; background: none; }
.deck-visual > svg { width: 100%; height: 100%; max-height: 100%; }
.deck-visual svg text { font-family: var(--font-ui); }

.deck-visual .trip { grid-template-columns: 70px minmax(0, 1fr); margin: 0; height: 100%; max-height: 100%; align-items: center; }
.deck-visual .trip svg { height: auto; max-height: min(100%, 72vh); }
.deck-visual .trip-card { display: none; }
/* Texte ancré en haut : le titre et la date restent à la même place d'une diapositive à l'autre. */
.deck-copy { align-self: start; margin-top: clamp(.5rem, 9vh, 6rem); display: grid; gap: clamp(.6rem, 2vh, 1.25rem); min-width: 0; }
.deck-kicker { color: var(--ink-soft); font-size: clamp(.9375rem, 1.3vw, 1.2rem); }
.deck-when { display: grid; gap: .35rem; }
.deck-when[hidden] { display: none; }
.deck-when-gen { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.1rem, 1.8vw, 1.75rem); line-height: 1.15; color: var(--ink-soft); }
.deck-when-date { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .8rem; }
.deck-when-date b { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 3.4vw, 3.4rem); line-height: 1; font-variant-numeric: lining-nums; }
.deck-when-date span { font-family: var(--font-display); font-size: clamp(1.05rem, 1.6vw, 1.6rem); color: var(--ink-soft); }
.deck-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem 1rem; }
.deck[data-visual="title"] .deck-top { justify-content: center; }
.deck-when-era[hidden] { display: none; }
.site .deck-when-era { padding: .15em .55em; border-radius: 4px; line-height: 1.2; background: var(--era-wash, var(--paper)); color: var(--era-ink, var(--ink)); font-family: var(--font-ui); font-size: clamp(.9rem, 1.2vw, 1.15rem); font-weight: 700; }
.deck h1 { font-size: clamp(1.7rem, 3.4vw, 3.4rem); line-height: 1.1; text-wrap: balance; overflow-wrap: anywhere; }
.deck-text { font-size: clamp(1.0625rem, 1.6vw, 1.6rem); line-height: 1.4; }
.deck .fig-verdict { font-size: clamp(1.2rem, 2vw, 2rem); }
.site .deck p + p { margin-top: 0; }
.deck-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: inherit; }
.deck[data-visual="title"] .deck-actions { justify-content: center; }
.deck[data-visual="title"] .deck-copy { align-self: center; margin-top: 0; }
.deck-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .5rem 1.25rem; align-items: center; padding: .6rem max(20px, env(safe-area-inset-right)) max(.6rem, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); background: var(--sheet); border-top: 1px solid var(--rule-strong); }
.deck-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.deck-steps button { display: grid; gap: .3rem; min-height: 44px; align-content: center; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; font-size: .875rem; color: var(--ink-soft); }
.deck-steps button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-steps [aria-current] { color: var(--ink); font-weight: 700; }
.deck-steps i { display: block; height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--accent) calc(var(--done, 0) * 100%), var(--rule) 0); }
.deck-nav { display: flex; gap: .5rem; align-items: center; }
.deck-btn, .site a.deck-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .4rem 1.1rem; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--sheet); color: var(--ink); text-decoration: none; cursor: pointer; font-weight: 600; white-space: nowrap; }
.deck-btn.is-primary, .site a.deck-btn.is-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.deck-btn:disabled { opacity: .4; cursor: default; }
.deck-count { font-variant-numeric: tabular-nums; color: var(--ink-soft); white-space: nowrap; }
@media (max-width: 899px) {
  .deck-copy { margin-top: 0; }
  .deck { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(220px, 1fr) auto; align-items: start; }
  .deck[data-visual="title"] { grid-template-rows: auto; align-content: center; }
  .deck-events li { grid-template-columns: 7em minmax(0, 1fr); }
  .deck-bar { grid-template-columns: 1fr auto; }
  .deck-steps { grid-column: 1 / -1; grid-row: 1; }
  .deck-steps button { min-height: 24px; }
  .deck-steps button span { display: none; }
}
@media (max-width: 559px) {
  #deck-play, .deck-count { display: none; }
  .deck-bar { padding-inline: 12px; }
  .deck-page .deck-btn { padding-inline: .8rem; font-size: .9375rem; }
  .deck-nav { justify-content: flex-end; }
}
@media (max-width: 899px) {
  .deck-visual .trip { grid-template-columns: minmax(0, 1fr); }
  .deck-visual .trip-map { display: none; }
  .deck-visual .trip svg { max-height: 210px; }
}

.deck-legend { list-style: none; display: grid; gap: .4rem; margin: 0; padding: 0; font-size: clamp(.9375rem, 1.2vw, 1.15rem); }
.deck-legend li { display: flex; align-items: center; gap: .6rem; }
.deck-legend i { flex: none; width: 1.1em; height: 1.1em; border: 1px solid var(--ink-soft); border-radius: 50%; }
