/* Styles propres à une page, chargés après style.css par cette page seulement
   (bloc page_css de base.html). Sortis de style.css pour l'alléger. */

.tfrise-page, .tfrise-admin{ --tip: 22px; }

.tfrise-hero{ margin: 14px 0 22px; }

.tfrise-title{ margin: 6px 0 6px; }

.tfrise-lede{ color: var(--ink-soft); font-size: 16px; margin: 0 0 14px; }

.tfrise-totals{ list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }

.tfrise-totals li{ background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--ink-soft); }

.tfrise-totals strong{ color: var(--indigo); font-size: 16px; }

.tfrise-totals small{ font-size: 12px; }

.tfrise-h2{ font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 10px; }

.tfrise-massifs{ background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 18px; }

.tfrise-ribbon{ display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 1px; background: var(--card); }

.tfrise-ribbon a{ flex: 1 1 0; min-width: 2px; background: var(--c); transition: transform .15s var(--ease-out); }

.tfrise-ribbon a:hover{ transform: scaleY(1.5); }

.tfrise-legend{ list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; padding: 0; font-size: 14px; }

.tfrise-legend li{ display: flex; align-items: baseline; gap: 6px; }

.tfrise-legend small{ color: var(--ink-soft); font-size: 12.5px; }

.tfrise-swatch{ width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex-shrink: 0; align-self: center; }

.tfrise-tools{ display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 18px; }

.tfrise-tools .summits-export{ margin: 0 0 0 auto; }

.tfrise-play[aria-pressed="true"]{ background: var(--indigo); border-color: var(--indigo); color: var(--card); }

.tfrise-admin-link{ padding: 5px 12px; font-size: 12px; text-decoration: none; }

.tfrise-now{
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50;
  display: flex; gap: 10px; align-items: baseline; max-width: calc(100vw - 32px);
  background: var(--indigo); color: var(--card); border-radius: 999px; padding: 8px 18px; box-shadow: var(--shadow-lg); font-size: 14px;
}

.tfrise-now[hidden]{ display: none; }

.tfrise-now strong{ color: #E9C77B; white-space: nowrap; }

.tfrise-now span{ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tfrise-now-cum{ opacity: .8; font-size: 12.5px; flex-shrink: 0; }

.tfrise{ list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0; }

.tfrise-step{ position: relative; min-width: 0; scroll-margin-top: 90px; padding: 0 0 22px; }

.tfrise-step.has-bg{ background: var(--bg); }

.tfrise-step.has-bg .tfrise-body{ padding-left: 10px; }

.tfrise-tag{ position: relative; z-index: 2; display: flex; flex-wrap: nowrap; white-space: nowrap; gap: 8px; align-items: center; height: 34px; margin: 0; padding: 6px 10px 4px; font-family: var(--font-ui); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.tfrise-tag-chapter{ color: var(--indigo); font-family: var(--font-display); font-style: italic; font-size: 16px; font-weight: 600; letter-spacing: 0; text-transform: none; }

.tfrise-tag-sub{ color: var(--frame, var(--brass)); border: 1.5px solid currentColor; border-radius: 999px; padding: 1px 8px; background: var(--card); }

.tfrise-frame{
  position: relative; z-index: 1; margin-right: calc(-1 * var(--tip) + 6px);
  clip-path: polygon(0 0, calc(100% - var(--tip)) 0, 100% 50%, calc(100% - var(--tip)) 100%, 0 100%, var(--tip) 50%);
}

.tfrise-step.is-first .tfrise-frame{ clip-path: polygon(0 0, calc(100% - var(--tip)) 0, 100% 50%, calc(100% - var(--tip)) 100%, 0 100%); }

.tfrise-step.has-frame .tfrise-frame{ background: var(--frame); padding: 4px 7px 4px 4px; }

.tfrise-arrow{
  position: relative; display: block; aspect-ratio: 16 / 10;
  background: var(--indigo); overflow: hidden; text-decoration: none; color: #fff;
  clip-path: polygon(0 0, calc(100% - var(--tip)) 0, 100% 50%, calc(100% - var(--tip)) 100%, 0 100%, var(--tip) 50%);
  transition: filter .2s, transform .25s var(--ease-out);
}

.tfrise-step.is-first .tfrise-arrow, .tfrise-arrow.is-first{ clip-path: polygon(0 0, calc(100% - var(--tip)) 0, 100% 50%, calc(100% - var(--tip)) 100%, 0 100%); }

.tfrise-arrow img{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.tfrise-arrow::after{ content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,16,10,.35), rgba(20,16,10,0) 40%, rgba(20,16,10,0) 55%, rgba(20,16,10,.62)); pointer-events: none; }

.tfrise-arrow-empty{ position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; opacity: .55; }

.tfrise-arrow-num, .tfrise-arrow-date, .tfrise-arrow-rest{ position: absolute; z-index: 1; text-shadow: 0 1px 6px rgba(0,0,0,.45); }

.tfrise-arrow-num{ left: calc(var(--tip) + 8px); bottom: 14px; font-weight: 800; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }

.tfrise-arrow-num small{ display: block; font-family: var(--font-ui); font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 2px; }

.tfrise-step.is-first .tfrise-arrow-num, .tfrise-arrow.is-first .tfrise-arrow-num{ left: 14px; }

.tfrise-arrow-date{ left: calc(var(--tip) + 8px); top: 10px; font-family: var(--font-ui); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

.tfrise-step.is-first .tfrise-arrow-date{ left: 14px; }

.tfrise-arrow-rest{ right: calc(var(--tip) + 6px); top: 10px; background: rgba(255,255,255,.9); color: var(--ink); text-shadow: none; border-radius: 999px; padding: 2px 9px; font-size: 11px; font-weight: 600; }

.tfrise-arrow-band{ position: absolute; left: 0; right: 0; bottom: 0; height: 7px; background: var(--c); z-index: 1; }

.tfrise-step.is-rest .tfrise-arrow img{ filter: grayscale(.7) brightness(1.05); }

a.tfrise-arrow:hover{ filter: brightness(1.08) saturate(1.1); }

.tfrise-body{ padding: 12px 18px 0 8px; }

.tfrise-step.is-first .tfrise-body{ padding-left: 0; }

.tfrise-step-title{ font-family: var(--font-body); font-size: 16px; font-weight: 700; line-height: 1.3; margin: 0 0 4px; }

.tfrise-step-title a{ color: var(--ink); text-decoration: none; }

.tfrise-step-title a:hover{ color: var(--indigo); text-decoration: underline; }

.tfrise-place{ font-size: 13px; color: var(--ink-soft); margin: 0 0 4px; }

.tfrise-text{ font-size: 14px; line-height: 1.5; color: var(--ink-soft); margin: 0 0 8px; }

.tfrise-chips{ list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; padding: 0; }

.tfrise-chips li{ display: inline-flex; align-items: center; gap: 5px; background: var(--paper-deep); border-radius: 999px; padding: 2px 9px 2px 7px; font-size: 12px; font-weight: 600; }

.tfrise-chips li::before{ content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

.tfrise-facts{ display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 0 0 4px; font-size: 13.5px; color: var(--indigo); }

.tfrise-facts strong{ font-size: 15px; }

.tfrise-cum{ color: var(--ink-soft); font-size: 12px; align-self: center; }

.tfrise-top{ font-size: 12.5px; color: var(--ink-soft); margin: 0; }

.tfrise-summits{ margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }

.tfrise-summits-main{ list-style: none; margin: 0; padding: 0; font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.5; }

.tfrise-summits small{ font-weight: 400; color: var(--ink-soft); font-size: 12px; font-variant-numeric: tabular-nums; }

.tfrise-summits-other{ margin: 2px 0 0; font-size: 12px; line-height: 1.5; color: var(--ink-soft); }

.tfrise-summits-other span{ white-space: nowrap; }

.tfrise-summits-other span:not(:last-child)::after{ content: " · "; }

.tfrise-end{ grid-column: 1 / -1; text-align: center; margin-top: 4px; }

.tfrise-end span{ font-family: var(--font-display); font-style: italic; color: var(--ink-soft); background: var(--paper); padding: 4px 14px; border: 1px dashed var(--line-strong); border-radius: 999px; }

.tfrise.is-playing .tfrise-step{ opacity: .35; transition: opacity .4s; }

.tfrise.is-playing .tfrise-step.is-current{ opacity: 1; }

.tfrise.is-playing .tfrise-step.is-current .tfrise-arrow{ transform: scale(1.04); }

@media (prefers-reduced-motion: no-preference){
  .tfrise--anim .tfrise-step{ opacity: 0; translate: -18px 0; transition: opacity .5s var(--ease-out), translate .5s var(--ease-out); }
  .tfrise--anim .tfrise-step.is-in{ opacity: 1; translate: none; }
  .tfrise--anim.is-playing .tfrise-step{ opacity: .35; }
  .tfrise--anim.is-playing .tfrise-step.is-current{ opacity: 1; }
}

@media (max-width: 640px){
  .tfrise{ grid-template-columns: 1fr; row-gap: 0; }
  .tfrise-step{ display: grid; grid-template-columns: 38% 1fr; grid-template-rows: auto 1fr; grid-template-areas: "arrow tag" "arrow body"; align-items: stretch; padding: 0; }
  .tfrise-step + .tfrise-step{ margin-top: calc(-1 * var(--tip) + 6px); }
  .tfrise-tag{ grid-area: tag; height: auto; flex-wrap: wrap; white-space: normal; padding: calc(var(--tip) + 2px) 10px 0 14px; }
  .tfrise-tag:empty{ display: none; }
  .tfrise-tag:not(:empty) + .tfrise-frame + .tfrise-body{ padding-top: 6px; }
  .tfrise-frame, .tfrise-step.is-first .tfrise-frame{ grid-area: arrow; display: flex; margin-right: 0; }
  .tfrise-body, .tfrise-step.is-first .tfrise-body, .tfrise-step.has-bg .tfrise-body{ grid-area: body; }
  .tfrise-step.has-frame .tfrise-frame{ padding: 5px; }
  .tfrise-frame, .tfrise-step .tfrise-arrow{ clip-path: polygon(0 0, 50% var(--tip), 100% 0, 100% calc(100% - var(--tip)), 50% 100%, 0 calc(100% - var(--tip))); }
  .tfrise-step .tfrise-arrow{ aspect-ratio: auto; min-height: 150px; flex: 1; }
  .tfrise-step.is-first .tfrise-frame, .tfrise-step.is-first .tfrise-arrow{ clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--tip)), 50% 100%, 0 calc(100% - var(--tip))); }
  .tfrise-step .tfrise-arrow-num, .tfrise-step.is-first .tfrise-arrow-num{ left: 10px; bottom: calc(var(--tip) + 6px); font-size: 26px; }
  .tfrise-step .tfrise-arrow-date, .tfrise-step.is-first .tfrise-arrow-date{ left: 10px; top: calc(var(--tip) + 2px); font-size: 10px; }
  .tfrise-step.is-first .tfrise-arrow-date{ top: 10px; }
  .tfrise-step .tfrise-arrow-rest{ right: 8px; top: calc(var(--tip) + 2px); }
  .tfrise-step .tfrise-arrow-band{ left: auto; top: 0; bottom: 0; width: 7px; height: auto; }
  .tfrise-body, .tfrise-step.is-first .tfrise-body, .tfrise-step.has-bg .tfrise-body{ padding: calc(var(--tip) + 2px) 10px calc(var(--tip) + 4px) 14px; }
  .tfrise-step-title{ font-size: 15px; }
  .tfrise-text{ font-size: 13.5px; }
  .tfrise-tools .summits-export{ margin-left: 0; }
  .tfrise-now{ bottom: 12px; padding: 7px 14px; font-size: 13px; }
  @media (prefers-reduced-motion: no-preference){
  .tfrise--anim .tfrise-step{ translate: 0 14px; }
}
}

.tfrise-admin-intro{ max-width: 760px; margin: -8px 0 22px; line-height: 1.6; }

.tfrise-admin-intro a{ color: var(--indigo); }

.tfrise-admin-list{ list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; max-width: 980px; }

.tfrise-admin-day{ background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; scroll-margin-top: 90px; }

.tfrise-admin-day.is-draft{ border-style: dashed; }

.tfrise-admin-head{ display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }

.tfrise-arrow--mini{ width: 150px; flex-shrink: 0; --tip: 16px; margin: 0; }

.tfrise-arrow--mini .tfrise-arrow-num{ font-size: 22px; bottom: 10px; }

.tfrise-arrow--mini.is-first .tfrise-arrow-num{ left: 10px; }

.tfrise-admin-title h2{ font-family: var(--font-body); font-size: 17px; font-weight: 700; margin: 0 0 4px; }

.tfrise-admin-title p{ margin: 0; font-size: 13.5px; color: var(--ink-soft); }

.tfrise-admin-draft{ display: inline-block; font-family: var(--font-ui); font-size: 11px; font-weight: 600; color: var(--brass); border: 1px solid currentColor; border-radius: 999px; padding: 1px 8px; vertical-align: middle; }

.tfrise-admin-form textarea{ width: 100%; }

.tfrise-admin-photos{ border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }

.tfrise-admin-photos legend{ font-size: 14px; font-weight: 600; margin-bottom: 8px; padding: 0; }

.tfrise-admin-photos legend small{ font-weight: 400; color: var(--ink-soft); }

.tfrise-admin-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 260px; overflow-y: auto; padding: 2px; }

.tfrise-pick{ position: relative; display: block; cursor: pointer; border-radius: var(--radius-xs); }

.tfrise-pick input{ position: absolute; opacity: 0; pointer-events: none; }

.tfrise-pick-media{ display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-xs); overflow: hidden; background: var(--paper-deep); outline: 2px solid transparent; outline-offset: 1px; transition: outline-color .15s; }

.tfrise-pick-media img{ width: 100%; height: 100%; object-fit: cover; display: block; }

.tfrise-pick input:checked + .tfrise-pick-media{ outline: 3px solid var(--brass); }

.tfrise-pick input:focus-visible + .tfrise-pick-media{ box-shadow: var(--ring); }

.tfrise-pick input:checked + .tfrise-pick-media::after{ content: "✓"; position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--brass); color: #fff; font-size: 13px; font-weight: 700; }

.tfrise-pick-label{ position: absolute; left: 4px; bottom: 4px; background: rgba(33,28,21,.78); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 600; }

.tfrise-admin-actions{ display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; }

.tfrise-admin-status{ font-size: 13px; color: var(--ink-soft); }

.tfrise-admin-status.is-ok{ color: #4F6B3A; }

.tfrise-admin-status.is-dirty{ color: var(--brass); }

.tfrise-admin-status.is-error{ color: var(--danger); }

@media (max-width: 640px){
  .tfrise-admin-day{ padding: 14px; }
  .tfrise-arrow--mini{ width: 112px; }
  .tfrise-admin-grid{ grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
}

.tfrise-admin-chapters{ margin-bottom: 26px; }

.tfrise-admin-chapters .field-hint{ margin: 0 0 12px; }

.tfrise-admin-chapters .tfrise-admin-actions{ margin-top: 8px; }

.tfrise-admin-sub{ margin-top: 10px; border-left: 3px solid var(--brass); padding: 4px 0 4px 12px; }

.tfrise-admin-sub summary{ cursor: pointer; font-size: 14px; font-weight: 600; color: var(--indigo); }

.tfrise-admin-sub[open] summary{ margin-bottom: 8px; }

.tfrise-admin-sub .field{ margin-bottom: 8px; }

.tfrise-admin-sub input{ width: 100%; }

.tfrise-parts{ background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 18px; }

.tfrise-parts-list{ list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.tfrise-part{ background: var(--bg); border-radius: var(--radius-xs); padding: 10px 14px; }

.tfrise-part-title{ margin: 0; font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: 19px; }

.tfrise-part-title a{ color: var(--indigo); text-decoration: none; }

.tfrise-part-title a:hover{ text-decoration: underline; }

.tfrise-part-title small, .tfrise-subs small{ font-family: var(--font-body); font-style: normal; font-weight: 400; font-size: 12.5px; color: var(--ink-soft); margin-left: 6px; }

.tfrise-part-text{ max-width: 780px; font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); margin-top: 4px; }

.tfrise-part-text p{ margin: 0 0 4px; }

.tfrise-subs{ list-style: none; margin: 8px 0 2px; padding: 0; display: grid; gap: 8px; }

.tfrise-subs li{ border-left: 4px solid var(--frame); padding: 2px 0 2px 10px; }

.tfrise-subs strong{ font-size: 14.5px; }
