/* Scène commune aux pistes : un CV fictif, une loupe qui le parcourt ligne par ligne.
   Chaque piste fournit ses jetons : --s-paper, --s-ink, --s-ink-2, --s-line, --s-ok, --s-ok-soft,
   --s-fib, --s-fib-soft, --s-check, --s-check-soft, --s-cv-font, --s-ui-font, --s-loupe, --s-glass, --s-scan. */

.scene { position: relative; width: 100%; max-width: 520px; }
.cv {
  position: relative;
  background: var(--s-paper);
  color: var(--s-ink);
  border: 1px solid var(--s-line);
  border-radius: var(--s-radius, 6px);
  padding: 26px 26px 20px;
  box-shadow: var(--s-shadow, 0 1px 2px rgb(0 0 0 / .06), 0 12px 32px -12px rgb(0 0 0 / .18));
  overflow: hidden;
  display: flex; flex-direction: column;
}
.scene.measure *, .scene.measure { transition: none !important; }
.cv-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid var(--s-line); }
.cv-name { font-family: var(--s-cv-font); font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em; }
.cv-role { font-family: var(--s-ui-font); font-size: .85rem; color: var(--s-ink-2); }
.cv-tag {
  position: absolute; top: 14px; right: 14px;
  font-family: var(--s-ui-font); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--s-ink-2); border: 1px dashed var(--s-line); border-radius: 3px; padding: 2px 6px;
}
.cv-section { font-family: var(--s-ui-font); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--s-ink-2); margin: 12px 0 4px; }
.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rows:last-of-type { margin-bottom: 14px; }
.row { position: relative; padding: 8px 34px 8px 10px; margin: 0 -10px; border-radius: 4px; transition: background-color .35s ease; }
.row-text { font-family: var(--s-cv-font); font-size: .95rem; line-height: 1.4; display: block; position: relative; z-index: 1; }
.row-text .yr { font-family: var(--s-ui-font); font-variant-numeric: tabular-nums; font-size: .82rem; color: var(--s-ink-2); margin-left: 6px; white-space: nowrap; }
.row .mark {
  position: absolute; right: 6px; top: 9px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; transform: scale(0); transition: transform .35s cubic-bezier(.3, 1.6, .5, 1);
  font: 700 12px/1 var(--s-ui-font); color: #fff;
}
.row .src {
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s ease, opacity .35s ease; opacity: 0;
  font-family: var(--s-ui-font); font-size: .78rem; line-height: 1.4; position: relative; z-index: 1;
}
.row .src > span { overflow: hidden; min-height: 0; display: block; }
.row .src span span { display: block; padding-top: 4px; }
.row .src b { font-weight: 600; }

.row.is-ok { background: var(--s-ok-soft); }
.row.is-ok .mark { background: var(--s-ok); transform: scale(1); }
.row.is-ok .mark::before { content: "✓"; }
.row.is-ok .src { grid-template-rows: 1fr; opacity: 1; color: var(--s-ok); }

/* Variante « éclat » : le fond vert ne dure qu'un instant, la coche verte reste. */
.scene[data-ok-flash] .row.is-ok { background: transparent; transition: background-color 1.4s ease; }
.scene[data-ok-flash] .row.is-ok.flash { background: var(--s-ok-soft); transition-duration: .3s; }

.row.is-check { background: var(--s-check-soft); }
.row.is-check .mark { background: var(--s-check); transform: scale(1); }
.row.is-check .mark::before { content: "?"; }
.row.is-check .src { grid-template-rows: 1fr; opacity: 1; color: var(--s-check); }

.row.is-fib { background: var(--s-fib-soft); }
.row.is-fib .mark { background: var(--s-fib); transform: scale(1); }
.row.is-fib .mark::before { content: "!"; }
.row.is-fib .src { grid-template-rows: 1fr; opacity: 1; color: var(--s-fib); }
.row .claim { text-decoration: underline 2px transparent; text-underline-offset: 3px; transition: text-decoration-color .3s ease, color .3s ease; }
.row.is-fib .claim { color: var(--s-fib); text-decoration-color: var(--s-fib); text-decoration-style: wavy; }

/* Bande de balayage qui suit la loupe (utilisée surtout par la piste B) */
.scan {
  position: absolute; left: 0; top: 0; height: 26px; width: 0; border-radius: 3px;
  background: var(--s-scan, transparent); pointer-events: none; opacity: 0; z-index: 0;
}

.loupe { position: absolute; left: 0; top: 0; width: 66px; height: 66px; pointer-events: none; z-index: 3; opacity: 0; will-change: transform; }
.loupe .glass { fill: var(--s-glass); }
.loupe .rim { fill: none; stroke: var(--s-loupe); stroke-width: 4; }
.loupe .handle { stroke: var(--s-loupe); stroke-width: 7; stroke-linecap: round; }
.loupe .glint { fill: none; stroke: #fff; stroke-opacity: .7; stroke-width: 2.5; stroke-linecap: round; }

.summary {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--s-line);
  font-family: var(--s-ui-font); font-size: .8rem; color: var(--s-ink-2);
  opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s ease;
}
.summary.on { opacity: 1; transform: none; }
.summary i { font-style: normal; display: inline-flex; align-items: center; gap: 6px; }
.summary i::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.summary .k-ok { color: var(--s-ok); } .summary .k-check { color: var(--s-check); } .summary .k-fib { color: var(--s-fib); }
.summary span { color: var(--s-ink-2); }

.scene.fade .row, .scene.fade .summary { transition-duration: .6s; }

@media (prefers-reduced-motion: reduce) {
  .row, .row .mark, .row .src, .summary { transition: none !important; }
  .loupe, .scan { display: none; }
}
