/* ============================================================================
 * Les trois rendus : site (une page web), slides (A4 paysage), docs (A4 portrait).
 * À l'écran dans la plateforme et dans app/rendu.html ; à l'impression (PDF), chaque
 * rendu prend son format de page.
 * ========================================================================== */

.r .is-off { opacity: .38; transition: opacity .2s; }
.r .is-off:hover { opacity: .75; }
.r-num { font-variant-numeric: tabular-nums; }
.r-kicker {
  margin: 0;
  color: var(--brand-ink);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.r-label {
  margin: 0 0 .6em;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.r-toc { list-style: none; margin: 0; padding: 0; }
.r-toc a { text-decoration: none; color: inherit; }
.r-toc .r-num { color: var(--ink-3); font-weight: 750; }

/* Le papier (slides, docs) reste blanc dans les deux thèmes. */
.r-sheet, .r-doc__paper {
  --ink: #1E293B;
  --ink-2: #475569;
  --ink-3: #7B879B;
  --line: #E2E7EE;
  --line-2: #ECEFF4;
  --panel: #FFFFFF;
  --panel-2: #F7F8FB;
  --hover: #EEF1F6;
  --brand: #2B87FF;
  --brand-ink: #1867BE;
  --brand-soft: rgba(43, 135, 255, .1);
  --on-brand: #FFFFFF;
  --vis-ph: linear-gradient(150deg, #EEF3FC, #EFEBF9);
  background: #FFFFFF;
  color: var(--ink);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* ---------- site : une page web ---------- */

.view--site { background: var(--panel); }
.r-site { max-width: 1240px; margin: 0 auto; padding: 0 32px 100px; container-type: inline-size; }
.r-site__hero { padding: 64px 0 44px; max-width: 900px; }
.r-site__title {
  margin: 12px 0 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 5.2cqw, 64px);
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -0.028em;
  text-wrap: balance;
}
.r-site__lead { margin: 18px 0 0; max-width: 700px; color: var(--ink-2); font-size: 19px; line-height: 1.55; }
.r-site .r-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.r-site .r-toc a {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.r-site .r-toc a:hover { border-color: var(--brand-line); color: var(--ink); }
.r-site .r-toc li.is-off { opacity: .4; }
.hide-off .r-toc li.is-off { display: none; }
/* Un slide : le visuel sur toute la largeur (statique, toutes les étapes), ses compteurs
   d'interactions posés sous le texte de chaque étape, puis sa description (repliée) */
.r-site__sec { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 40px 0; border-top: 1px solid var(--line-2); scroll-margin-top: 0; }
.r-site__vis { position: relative; }
.r-site__marks { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.r-site__marks[hidden] { display: none; }
.r-site__marks > * { pointer-events: auto; }
html.is-picking-page .r-site__marks { display: none; } /* pendant le pointage, le slide se pointe */
.r-site__bar { display: flex; justify-content: flex-end; }
.r-site__more {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
}
.r-site__more:hover { background: var(--hover); color: var(--ink); }
.r-site__more[aria-expanded="true"] { color: var(--brand-ink); }
.r-site__text { display: flex; flex-direction: column; gap: 14px; min-width: 0; max-width: 880px; padding: 4px 0 6px; }
.r-site__text[hidden] { display: none; }
.r-site__text .tx-seg--step { cursor: default; }
.r-site__text .tx-seg--step.is-ix { cursor: pointer; }
.r-site__text .tx-seg--step.is-ix:hover { background: var(--hover); }
.r-num--big {
  margin: 0;
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #2B87FF, #8676FF);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.r-site__h { margin: 0; font-family: var(--font-display); font-size: 30px; font-weight: 750; line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
.r-site__text .tx { font-size: 16.5px; }
.r-site__vis .vis { border-radius: 16px; }
.r-site__foot {
  display: flex;
  justify-content: space-between;
  padding: 28px 0 0;
  border-top: 1px solid var(--line-2);
  color: var(--ink-3);
  font-size: 13px;
}
@container (max-width: 820px) {
  .r-site__sec { padding: 26px 0; }
  .r-site__hero { padding: 40px 0 30px; }
}

/* Petit écran : chaque étape devient un bloc (son texte, son compteur, son image). Le visuel
   entier reste là, invisible : c'est lui qu'on lit pour composer les blocs. */
.r-site__packs { display: none; }
@container (max-width: 600px) {
  .r-site__vis { position: absolute; top: 26px; left: 0; right: 0; opacity: 0; pointer-events: none; }
  .r-site__packs { display: flex; flex-direction: column; gap: 26px; min-height: 180px; }
  .r-site__bar { justify-content: flex-start; }
  .r-site__more { height: 30px; padding: 0 4px; }
}
.r-pk { display: flex; flex-direction: column; gap: 12px; }
.r-pk[hidden], .r-pk__txt[hidden] { display: none; }
.r-pk + .r-pk { padding-top: 22px; border-top: 1px dashed var(--line); }
.r-pk--intro + .r-pk { padding-top: 0; border-top: 0; }
/* le titre du slide sur son fond (celui du slide en grand écran), ses textes à leurs couleurs */
.r-pk--intro { padding: 22px 20px 20px; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--line-2); }
.r-pk--intro .r-crop { box-shadow: none; border-radius: 10px; }
.r-pk__txt { display: flex; flex-direction: column; gap: 4px; }
.r-pk__grp { display: flex; flex-direction: column; gap: 4px; }
.r-pk__grp + .r-pk__grp { margin-top: 10px; }
.r-pk__txt p { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.r-pk__txt .r-pk__t { color: var(--ink); font-family: var(--font-display); font-size: 27px; font-weight: 750; line-height: 1.12; letter-spacing: -0.02em; }
.r-pk__txt .r-pk__h { margin-top: 2px; color: var(--ink); font-family: var(--font-display); font-size: 19px; font-weight: 700; line-height: 1.25; }
.r-pk__txt .r-pk__k { color: var(--brand-ink); font-size: 11.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.r-pk__txt .r-pk__s { color: var(--ink-3); font-size: 13.5px; }
.r-pk__txt .r-pk__li { position: relative; padding-left: 14px; }
.r-pk__txt .r-pk__li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.r-pk__txt .tx-seg, .r-pk__txt .tx-seg--step { padding-left: 0; margin-left: 0; border: 0; background: none; cursor: default; }
.r-pk__ix { display: flex; }
.r-crop { position: relative; overflow: hidden; width: 100%; border-radius: 12px; box-shadow: 0 0 0 1px var(--line-2); }
.r-crop__in { position: absolute; }
.r-crop .vis { border-radius: 0; box-shadow: none; }

/* ---------- dynamique : feuilles A4 paysage (le slide vivant et sa version courte) ---------- */

.view--dynamique { background: var(--bg); }
.r-dynamique { display: flex; flex-direction: column; align-items: center; gap: 30px; padding: 30px 22px 120px; }
.r-sheet {
  width: min(100%, 1080px);
  aspect-ratio: 297 / 210;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: 2.2cqw;
  padding: 3.8cqw 4.4cqw 2.6cqw;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 18px 40px -22px rgba(16, 24, 40, .35);
  scroll-margin-top: 20px;
}
.r-sheet__head { display: flex; align-items: baseline; gap: 1.4cqw; padding-bottom: 1.4cqw; border-bottom: 1px solid var(--line); }
.r-sheet__head .r-num { color: var(--brand-ink); font-family: var(--font-display); font-size: 1.9cqw; font-weight: 800; }
.r-sheet__h { flex: 1; min-width: 0; margin: 0; font-family: var(--font-display); font-size: 2.3cqw; font-weight: 750; line-height: 1.15; letter-spacing: -0.015em; }
.r-sheet__ctx { color: var(--ink-3); font-size: 1.05cqw; white-space: nowrap; }
.r-sheet__body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 64fr) minmax(0, 36fr); align-items: center; gap: 3cqw; }
.r-sheet__vis { display: flex; flex-direction: column; gap: .8cqw; min-width: 0; }
.r-sheet__text { max-height: 100%; }
.r-sheet__vis .vis { border-radius: .9cqw; box-shadow: 0 0 0 1px var(--line), 0 10px 26px -18px rgba(16, 24, 40, .4); }
.r-sheet__text { min-width: 0; min-height: 0; overflow: auto; }
.r-sheet__text .r-label { font-size: .95cqw; }
.r-sheet__text .tx { font-size: 1.35cqw; }
.r-sheet__foot { display: flex; justify-content: space-between; color: var(--ink-3); font-size: .95cqw; }
.r-sheet .stepbar { min-height: 0; }

/* ---------- slides : les slides en images statiques (toutes les étapes, rien de mis en avant) ---------- */

.view--slides { background: var(--bg); }
.r-slides {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: 28px 24px;
  max-width: 1560px;
  margin: 0 auto;
  padding: 26px 24px 120px;
}
.r-shots__head { grid-column: 1 / -1; padding: 6px 2px 4px; }
.r-shots__title { margin: 8px 0 0; font-family: var(--font-display); font-size: 26px; font-weight: 750; letter-spacing: -0.02em; }
.r-shots__lead { margin: 6px 0 0; color: var(--ink-3); font-size: 13.5px; }
.r-shot { display: flex; flex-direction: column; gap: 9px; min-width: 0; scroll-margin-top: 16px; }
.r-shot__vis .vis { border-radius: 10px; box-shadow: 0 0 0 1px var(--line), var(--shadow-2); }
.r-shot__cap { display: flex; align-items: baseline; gap: 9px; margin: 0; padding: 0 2px; min-width: 0; }
.r-shot__cap .r-num { color: var(--brand-ink); font-family: var(--font-display); font-weight: 800; }
.r-shot__t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.hide-off .r-shot.is-off { display: none; }

/* La miniature cliquable (Dynamique, Slides) : un clic l'ouvre en plein écran. */
.r-sheet__frame, .r-shot__vis { position: relative; }
.r-zoom {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: zoom-in;
}
.r-zoom span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .75);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 650;
  opacity: 0;
  transition: opacity .15s;
}
.r-zoom:hover span, .r-zoom:focus-visible span { opacity: 1; }
.r-zoom:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
html.is-picking-page .r-zoom, html.is-picking-page .r-more { display: none; } /* pendant le pointage, le slide se pointe */

/* Le menu « ⋯ » d'une miniature (vue Slides) : modifier avec Claude, télécharger. */
.r-more { position: absolute; top: 10px; right: 10px; z-index: 3; }
.r-more__btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  color: var(--ink-2);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(6px);
}
.r-more__btn:hover, .r-more.is-open .r-more__btn { background: var(--panel); color: var(--ink); }
.r-more__btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.r-more__menu { width: 300px; cursor: default; }
.r-more__ic { flex: none; display: grid; place-items: center; width: 28px; color: var(--ink-3); }
.r-more__chev { flex: none; color: var(--ink-3); transition: transform .15s; }
.r-more [aria-expanded="true"] .r-more__chev { transform: rotate(180deg); }
.r-more__sub { margin: 2px 0 2px 14px; padding-left: 8px; border-left: 2px solid var(--line-2); }
.r-more__sub .dl__fmt { width: 42px; }

/* ---------- docs : A4 portrait qui défile ---------- */

.view--docs { background: var(--bg); }
.r-docs { padding: 30px 22px 120px; }
.r-doc__paper {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: clamp(28px, 7vw, 76px) clamp(22px, 8vw, 84px) 90px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 18px 40px -22px rgba(16, 24, 40, .35);
}
.r-doc__head { padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.r-doc__title { margin: 10px 0 0; font-family: var(--font-display); font-size: clamp(28px, 4.4vw, 40px); font-weight: 750; line-height: 1.1; letter-spacing: -0.022em; }
.r-doc__lead { margin: 14px 0 0; color: var(--ink-2); font-size: 17px; line-height: 1.6; }
.r-toc--doc { margin-top: 24px; display: flex; flex-direction: column; gap: 2px; counter-reset: none; }
.r-toc--doc a { display: flex; gap: 12px; padding: 5px 0; color: var(--ink-2); font-size: 14.5px; border-bottom: 1px dotted var(--line); }
.r-toc--doc a:hover { color: var(--brand-ink); }
.r-toc--doc li.is-off { opacity: .4; }
.r-doc__ch { padding-top: 44px; scroll-margin-top: 10px; }
.r-doc__ch + .r-doc__ch { margin-top: 10px; border-top: 1px solid var(--line-2); }
.r-doc__top { display: flex; flex-direction: column; gap: 6px; width: min(100%, 380px); margin-bottom: 22px; }
.r-doc__top .vis { border-radius: 10px; box-shadow: 0 0 0 1px var(--line), 0 10px 26px -18px rgba(16, 24, 40, .4); }
.r-doc__h { display: flex; align-items: baseline; gap: 12px; margin: 0 0 16px; font-family: var(--font-display); font-size: 26px; font-weight: 750; line-height: 1.15; letter-spacing: -0.018em; }
.r-doc__h .r-num { color: var(--brand-ink); font-size: .8em; }
.r-doc__ch .tx { font-size: 16px; line-height: 1.7; }

/* ---------- export (app/export.js) : rendu hors écran, à taille fixe ---------- */

.ov-export-host { position: fixed; left: -30000px; top: 0; z-index: -1; pointer-events: none; }
.ov-capture { position: fixed; left: 0; top: 0; width: 1280px; height: 720px; border: 0; opacity: 0; pointer-events: none; z-index: -1; }
.vis--img img { display: block; width: 100%; height: 100%; }
.r.is-export.r-docs { padding: 0; }
.r.is-export .r-doc__paper { width: 794px; margin: 0; padding: 0 72px; border-radius: 0; box-shadow: none; }
.r.is-export .r-doc__ch { padding-top: 0; }
.r.is-export .r-doc__ch + .r-doc__ch { margin-top: 0; border-top: 0; }
.r.is-export .r-doc__head { padding-top: 8px; }

/* ---------- impression ---------- */

@page paysage { size: A4 landscape; margin: 0; }
@page diapo { size: 297mm 167.06mm; margin: 0; } /* 16:9, une slide par page */
@page portrait { size: A4 portrait; margin: 16mm 18mm 18mm; }
@media print {
  html, body { height: auto !important; background: #FFFFFF !important; }
  .side, .side-veil, .bar, .toasts, .present, .rd-bar, .stepbar, .r-zoom, .r-more { display: none !important; }
  .app, .main, .scroll { display: block !important; height: auto !important; overflow: visible !important; }
  .r .is-off { display: none !important; }
  .view--site, .view--dynamique, .view--slides, .view--docs { background: #FFFFFF; }
  .r-dynamique { display: block; padding: 0; }
  .r-sheet {
    page: paysage;
    width: 297mm;
    height: 210mm;
    aspect-ratio: auto;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    break-after: page;
    break-inside: avoid;
  }
  .r-sheet__text { overflow: hidden; }
  .r-slides { display: block; max-width: none; padding: 0; }
  .r-shots__head { display: none; }
  .r-shot { page: diapo; width: 297mm; height: 167.06mm; break-after: page; break-inside: avoid; gap: 0; }
  .r-shot__cap { display: none; }
  .r-shot__vis .vis { border-radius: 0; box-shadow: none !important; }
  .r-docs { padding: 0; }
  .r-doc__paper { page: portrait; width: auto; padding: 0; box-shadow: none; border-radius: 0; }
  .r-doc__top, .r-doc__h { break-inside: avoid; break-after: avoid; }
  .r-site { padding: 0 12mm; }
  .r-site__sec { break-inside: avoid; padding: 10mm 0; }
  .r-site__text[hidden] { display: flex; }
  .r-site__bar { display: none; }
  .vis { box-shadow: 0 0 0 1px #E2E7EE !important; }
}

/* ---------- docs : le composant d'un slide, ses états et leurs descriptifs ---------- */

.r-cmp { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.r-cmp[hidden] { display: none; }
.r-cmp__h { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 750; letter-spacing: -0.01em; color: var(--ink); }
.r-cmp__h .ic { flex: none; color: var(--brand-ink); }
.r-cmp__lead { margin: 8px 0 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; }
.r-cmp__size { margin: 6px 0 0; color: var(--ink-3); font-size: 12.5px; }
.r-cmp__list { display: flex; flex-direction: column; gap: 28px; margin-top: 18px; }
.r-cmp__etat { break-inside: avoid; }
.r-cmp__t { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 15.5px; font-weight: 750; color: var(--ink); }
.r-cmp__k { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: #FFFFFF; font-size: 11.5px; font-weight: 800; }
.r-cmp__d { margin: 5px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.r-cmp__vis { margin-top: 10px; }
.r-cmp__screen { position: relative; overflow: hidden; border-radius: 10px; background: #F6F8FC; box-shadow: 0 0 0 1px var(--line); }
.r-cmp__screen iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: transparent; }
.r-cmp__vis img { display: block; max-width: 100%; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.r-cmp__go { margin: 9px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.r-cmp__go li { display: flex; align-items: flex-start; gap: 7px; color: var(--ink-2); font-size: 13.5px; line-height: 1.45; }
.r-cmp__go .ic { flex: none; margin-top: 2px; color: var(--brand-ink); }
.r-cmp__go b { color: var(--ink); }
.r-cmp code { font-family: var(--font-mono); font-size: 12px; }
.r-cmp__more { margin-top: 22px; }
.r-cmp__free { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; }
