/* ==========================================================================
   pdf.css — la section PDF.

   Elle reprend l'ambiance des captures fournies : fond blanc, accent rouge,
   pastilles pleines, lignes de fichiers separees par un filet. Rien n'est
   recopie de style.css : seules les VARIABLES d'accent changent, le reste de
   la coquille (feuilles, toasts, boutons) reste celui de Plume.
   ========================================================================== */

/* ==========================================================================
   LES QUATRE MODES.

   Un mode ne change qu'une chose : la valeur de --accent. Tout le reste de
   l'application la lit deja. C'est ce qui permet de repeindre une moitie
   entiere de Plume avec quatre regles, et d'en ajouter une cinquieme sans
   toucher a une seule autre ligne.
   ========================================================================== */
.mode-scope{
  --mode:#4338ca;
  --mode-ink:#ffffff;
  --mode-soft:#ecebfb;
  --pdf-sheet:#ffffff;          /* le « papier » des listes */
}
/* Lot 46 (rapport n° 6) : un mode ne change PLUS --accent. Le bouton rouge en
   PDF, bleu en Texte, vert en Tableur : l'œil ne savait jamais quelle était
   « la couleur de Plume ». L'action garde l'indigo partout ; le mode ne marque
   plus que sa pastille et l'icône du type de fichier (--mode).
   Les cinq teintes sont une même famille, assez profondes pour porter du blanc
   (≥ 4,5:1, calculé au banc t-lot46), y compris l'orange des diapositives. */
.mode-scope[data-mode="pdf"]    { --mode:#b42318; --mode-soft:#fdeceb; }
.mode-scope[data-mode="diapos"] { --mode:#b45309; --mode-soft:#fdf1e2; }
.mode-scope[data-mode="tableur"]{ --mode:#15803d; --mode-soft:#e7f5ec; }
.mode-scope[data-mode="maths"]  { --mode:#6d28d9; --mode-soft:#f1eafe; }   /* lot 16 */

/* ⚠️ Hors de la requête média, seul le thème sombre CHOISI compte : un
   « :not([data-theme=light]) » ici s'appliquait aussi au thème automatique
   en plein jour, et teintait les fonds de bleu nuit. */
:root[data-theme="dark"] .mode-scope{ --mode:#a5b4fc; --mode-ink:#12121a; --mode-soft:#272750; }
:root[data-theme="dark"] .mode-scope[data-mode="pdf"]    { --mode:#fca5a5; --mode-soft:#3a1b18; }
:root[data-theme="dark"] .mode-scope[data-mode="diapos"] { --mode:#fcd34d; --mode-soft:#3a2814; }
:root[data-theme="dark"] .mode-scope[data-mode="tableur"]{ --mode:#86efac; --mode-soft:#123021; }
:root[data-theme="dark"] .mode-scope[data-mode="maths"]  { --mode:#c4b5fd; --mode-soft:#251c45; }
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .mode-scope{ --mode:#a5b4fc; --mode-ink:#12121a; --mode-soft:#272750; }
  :root:not([data-theme="light"]) .mode-scope[data-mode="pdf"]    { --mode:#fca5a5; --mode-soft:#3a1b18; }
  :root:not([data-theme="light"]) .mode-scope[data-mode="diapos"] { --mode:#fcd34d; --mode-soft:#3a2814; }
  :root:not([data-theme="light"]) .mode-scope[data-mode="tableur"]{ --mode:#86efac; --mode-soft:#123021; }
  :root:not([data-theme="light"]) .mode-scope[data-mode="maths"]  { --mode:#c4b5fd; --mode-soft:#251c45; }
}
/* Le filet de 3 px sous la barre du haut a disparu (lot 46) : la pastille
   active dit le mode, une seconde marque colorée en faisait trop. */

/* ------------------------------ marque ------------------------------ */
/* « Plume » puis le nom du mode, dans la couleur du mode. Les deux moities de
   l'application portent desormais le meme titre, construit pareil. */
.pbrand{
  display:flex;align-items:baseline;gap:6px;
  font-size:var(--t-ecran);letter-spacing:-.01em;margin:0;min-width:0;line-height:1.1;
}
.pbrand__a{font-weight:700;color:var(--ink)}
/* Lot 46 : le nom du mode n'est plus écrit en couleur à côté de « Plume » (la
   pastille le dit déjà) ; il reste lu par les lecteurs d'écran. */
.pbrand__b{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}

/* ------------------------------ barre de modes ------------------------------ */
.mode-bar{
  display:flex;gap:6px;
  padding:2px 14px 2px;
  flex:0 0 auto;
  overflow-x:auto;scrollbar-width:none;
}
.mode-bar::-webkit-scrollbar{display:none}
.mode-chip{
  flex:1 1 auto;min-width:0;   /* lot 46 : la largeur suit le libellé (« Sciences » ne se coupe plus) */
  display:flex;align-items:center;justify-content:center;gap:6px;
  /* Lot 46 : 48 px sous le doigt, 36 px à l'œil — la bordure transparente
     agrandit la cible, le fond s'arrête à la bordure, le filet est une ombre
     intérieure. */
  min-height:48px;padding:0 10px;
  border-radius:999px;
  border:6px solid transparent;border-left-width:0;border-right-width:0;
  background:var(--surface);background-clip:padding-box;
  box-shadow:inset 0 0 0 1px var(--line-2);
  color:var(--ink-2);
  font-size:var(--t-second);font-weight:600;
  transition:background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.mode-chip__dot{
  width:8px;height:8px;border-radius:50%;
  background:var(--m-color);flex:0 0 auto;
}
/* Le meme pochoir que la marque du haut : la pastille ne porte plus un point
   de couleur mais le logo, dans la couleur du mode — et en blanc quand elle
   est active, puisque `background` passe deja a #fff plus bas. */
@supports (mask-image:url(i.png)) or (-webkit-mask-image:url(i.png)){
  .mode-chip__dot{
    width:17px;height:17px;border-radius:0;margin-left:-2px;
    -webkit-mask:url(../icons/mark.png) center/contain no-repeat;
    mask:url(../icons/mark.png) center/contain no-repeat;
  }
}
.mode-chip__l{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mode-chip.is-on{
  background:var(--m-color);background-clip:padding-box;
  box-shadow:inset 0 0 0 1px var(--m-color);
  color:var(--m-ink, #fff);
}
.mode-chip.is-on .mode-chip__dot{background:var(--m-ink, #fff)}

/* ------------------------------ pastilles de type ------------------------------ */
.chip-row{
  display:flex;gap:8px;
  padding:10px 14px 12px;
  overflow-x:auto;
  scrollbar-width:none;
  flex:0 0 auto;
}
.chip-row::-webkit-scrollbar{display:none}
.chip{
  flex:0 0 auto;
  min-height:36px;
  padding:0 18px;
  border-radius:999px;
  border:1px solid var(--line-2);
  background:var(--surface);
  color:var(--ink);
  font-size:var(--t-second);font-weight:600;
  transition:background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.chip.is-on{
  background:var(--chip-color, var(--accent));
  border-color:var(--chip-color, var(--accent));
  color:#fff;
}

/* ------------------------------ ligne de fichier ------------------------------ */
.file-list{
  background:var(--surface);
  border-radius:var(--r-lg);
  margin:0 12px;
  overflow:hidden;
  box-shadow:var(--shadow-sm);
}
.file-row{
  display:flex;align-items:center;
  padding-right:4px;
  position:relative;
}
/* Le filet part apres le glyphe, comme sur la capture. */
.file-row + .file-row::before{
  content:"";position:absolute;left:68px;right:0;top:0;
  border-top:1px solid var(--line);
}
.file-row__body{
  flex:1 1 auto;min-width:0;
  display:flex;align-items:center;gap:14px;
  padding:12px 6px 12px 14px;
  text-align:left;
}
.file-row__icon{position:relative;flex:0 0 auto;display:block}
.file-glyph{display:block;width:34px;height:41px}
.file-glyph text{font-size:var(--t-legende)}
.file-row__lock{
  position:absolute;right:-4px;bottom:-2px;
  width:18px;height:18px;border-radius:50%;
  background:var(--surface);
  display:grid;place-items:center;
  color:var(--ink-2);
  box-shadow:0 0 0 1.5px var(--surface);
}
.file-row__lock svg{width:12px;height:12px;stroke-width:2.2}
.file-row__text{flex:1 1 auto;min-width:0;display:block}
.file-row__name{
  display:block;
  font-size:var(--t-second);font-weight:600;line-height:1.3;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.file-row__meta{
  display:block;margin-top:3px;
  font-size:var(--t-legende);color:var(--ink-3);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
/* Des qu'une ligne porte des etiquettes ou un badge, la coupure a droite les
   escamote justement les uns apres les autres. On laisse alors revenir a la
   ligne : deux lignes de meta valent mieux qu'un « Scellé » invisible. */
.file-row__meta:has(.tag-pill),
.file-row__meta:has(.badge-seal){
  white-space:normal;overflow:visible;text-overflow:clip;line-height:1.7;
}
/* La case d'une ligne à cocher, dans « Avant d'envoyer ». Elle remplace
   l'icône d'un `menu-item` : même gabarit, donc rien ne saute. */
.coche{
  flex:0 0 auto;
  width:22px;height:22px;margin-top:1px;
  border-radius:6px;
  border:2px solid var(--ink-3);
  display:grid;place-items:center;
  font-size:var(--t-second);font-weight:700;line-height:1;
  color:transparent;
}
.coche--on{
  background:var(--accent);border-color:var(--accent);color:var(--accent-ink);
}

/* Le rang d'un fichier dans une fusion. On DEMANDE un ordre : il faut donc le
   montrer, et un simple fond teinté ne dit jamais « troisième ». */
.pick-rang{
  flex:0 0 auto;
  min-width:24px;height:24px;padding:0 6px;
  border-radius:999px;
  background:var(--accent);color:var(--accent-ink);
  font-size:var(--t-note);font-weight:700;font-variant-numeric:tabular-nums;
  display:grid;place-items:center;
}
.pick-rang[hidden]{display:none}
.badge-new{
  display:inline-block;margin-left:8px;
  width:8px;height:8px;border-radius:50%;
  background:var(--accent);
  overflow:hidden;white-space:nowrap;text-indent:14px;color:transparent;
  font-size:var(--t-legende);line-height:8px;vertical-align:1px;
}
.file-row__more{
  flex:0 0 auto;
  width:var(--tap);height:var(--tap);
  display:grid;place-items:center;
  color:var(--ink-3);
  border-radius:50%;
}
.file-row__more:active{background:var(--surface-3)}

/* ------------------------------ boite a outils ------------------------------ */
.tool-grid{
  display:grid;grid-template-columns:repeat(2,1fr);
  gap:10px;padding:4px 12px 12px;
}
/* Lot 173 (rapport n° 18) : l'écran Outils rangé — une famille repliée, son nombre, ses outils dessous. */
.tool-famille{grid-column:1/-1;border-top:1px solid var(--line)}
.tool-famille>summary{display:flex;align-items:center;gap:10px;min-height:52px;padding:0 4px;font-weight:650;font-size:var(--t-corps);cursor:pointer;list-style:none}
.tool-famille>summary::-webkit-details-marker{display:none}
.tool-famille__n{margin-left:auto;color:var(--ink-3);font-variant-numeric:tabular-nums;font-weight:400}
.tool-famille>summary::after{content:"";width:9px;height:9px;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg);transition:transform .15s ease}
.tool-famille[open]>summary::after{transform:rotate(-135deg)}
.tool-famille>summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
.tool-famille__in{display:grid;grid-template-columns:inherit;gap:10px;padding:0 0 12px}
.tool-grid>.tool-famille>.tool-famille__in{grid-template-columns:repeat(2,1fr)}
.tool-grid--section{grid-column:1/-1;margin:10px 2px 0;font-size:var(--t-note);
  font-weight:700;color:var(--ink-3);text-transform:uppercase;letter-spacing:.06em}
.tool-tile{
  display:flex;align-items:center;gap:12px;
  padding:14px 12px;
  background:var(--surface);
  border-radius:var(--r-md);
  box-shadow:var(--shadow-sm);
  text-align:left;
}
.tool-tile:active{transform:scale(.98)}
.tool-tile__icon{
  flex:0 0 auto;width:38px;height:38px;border-radius:11px;
  display:grid;place-items:center;
  background:var(--t-soft,var(--accent-soft));
  color:var(--t-color,var(--accent));
}
.tool-tile__icon svg{width:20px;height:20px;stroke-width:2}
.tool-tile__t{display:block;font-size:var(--t-second);font-weight:600;line-height:1.25}
.tool-tile__d{display:block;font-size:var(--t-legende);color:var(--ink-3);margin-top:2px}

/* ------------------------------ barre d'action du bas ------------------------------ */
/* Le gros bouton noir arrondi de la capture « Divisé (6) ». */
.action-bar{
  flex:0 0 auto;
  padding:10px 14px calc(10px + var(--safe-b));
  background:var(--surface);
  border-top:1px solid var(--line);
}
.action-btn{
  width:100%;min-height:54px;
  border-radius:999px;
  background:var(--ink);color:var(--bg);
  font-size:var(--t-corps);font-weight:600;
}
.action-btn[disabled]{opacity:.4}
.action-btn--accent{background:var(--accent);color:var(--accent-ink)}   /* pas #fff : en sombre, l’accent clair veut une encre sombre (axe, lot 27) */

/* pilule discrete de la barre du haut (« Ajouter ») */
.pill-btn{
  min-height:34px;padding:0 15px;
  border-radius:999px;border:1px solid var(--line-2);
  background:var(--surface);
  font-size:var(--t-note);font-weight:600;
}

/* ------------------------------ lecteur ------------------------------ */
.reader{
  flex:1 1 auto;min-height:0;
  overflow:auto;
  background:var(--surface-3);
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
}
.reader__pages{
  /* Lot 181 : « safe » — une page zoomée plus large que l’écran part du bord
     gauche, qu’on peut atteindre en faisant défiler (centrée, elle le perdait). */
  display:flex;flex-direction:column;align-items:safe center;
  gap:10px;padding:10px 0 14px;
}
.rpage{
  position:relative;
  background:#fff;
  box-shadow:var(--shadow-sm);
  flex:0 0 auto;
  /* Lot 181 (rapport n° 19) : PAS de max-width. Elle ramenait la largeur d’une
     page zoomée à celle de l’écran sans toucher à sa hauteur : la page était
     écrasée (782 → 407 px au zoom ×2, 52 %). La largeur vient de reader.js,
     qui la recalcule à chaque changement de taille (relayout). */
  /* Lot 100 : une page a sa taille (posée par reader.js) : ce qu'on y peint ne remet pas en page les 499 autres. */
  contain:strict;
}
.rpage canvas{display:block;width:100%;height:100%}
/* Lot 188 (rapport n° 19) : jamais de page blanche. Tant qu’elle n’est pas nette, une page est grise,
   son numéro au milieu ; puis vient l’aperçu (reader.js), puis la page nette. */
.rpage:not(.est-peinte){background:var(--surface-2)}
.rpage:not(.est-peinte)::before{content:attr(data-n);position:absolute;inset:0;display:grid;place-items:center;
  font-size:28px;font-weight:700;color:var(--ink-3);font-variant-numeric:tabular-nums}
.rpage__apercu{position:absolute;inset:0}
.rpage__num{
  position:absolute;right:8px;bottom:8px;
  padding:2px 8px;border-radius:999px;
  background:rgba(0,0,0,.55);color:#fff;
  font-size:11px;font-weight:600;
  pointer-events:none;opacity:0;transition:opacity .2s;
}
.reader.is-scrolling .rpage__num{opacity:1}
/* Mode sombre du DOCUMENT : inversion + rotation de teinte, pour que le noir
   devienne blanc sans que les images virent au negatif colore. */
.reader.is-inverted .rpage canvas{filter:invert(1) hue-rotate(180deg)}
.reader.is-inverted{background:#0b0d11}

/* ---------- couche de texte (lot 15) ----------
   Reprise de pdf_viewer.css de pdf.js 4.10.38 (Apache 2.0), reduite a ce que
   le lecteur utilise : des mots transparents poses sur leurs glyphes. */
.textLayer{
  position:absolute;text-align:initial;inset:0;overflow:clip;opacity:1;
  line-height:1;-webkit-text-size-adjust:none;text-size-adjust:none;
  forced-color-adjust:none;transform-origin:0 0;caret-color:CanvasText;z-index:0;
}
.textLayer :is(span,br){
  color:transparent;position:absolute;white-space:pre;cursor:text;transform-origin:0% 0%;
}
.textLayer > :not(.markedContent),.textLayer .markedContent span:not(.markedContent){z-index:1}
.textLayer span.markedContent{top:0;height:0}
.textLayer span[role="img"]{user-select:none;cursor:default}
.textLayer ::selection{background:rgba(59,110,246,.32)}
.textLayer br::selection{background:transparent}
.textLayer .endOfContent{display:block;position:absolute;inset:100% 0 0;z-index:0;cursor:default;user-select:none}
.textLayer.selecting .endOfContent{top:0}
.textLayer[data-main-rotation="90"]{transform:rotate(90deg) translateY(-100%)}
.textLayer[data-main-rotation="180"]{transform:rotate(180deg) translate(-100%,-100%)}
.textLayer[data-main-rotation="270"]{transform:rotate(270deg) translateX(-100%)}
/* En mode sombre du document, la selection doit rester visible. */
.reader.is-inverted .textLayer ::selection{background:rgba(255,196,0,.4)}

/* liens et notes du fichier : des zones transparentes, au-dessus du texte */
.rpage__liens{position:absolute;inset:0;pointer-events:none;z-index:2}
.rpage__lien,.rpage__note{
  position:absolute;pointer-events:auto;
  background:transparent;border:0;padding:0;margin:0;cursor:pointer;
  border-radius:2px;
}
.rpage__lien:focus-visible,.rpage__lien:hover{background:rgba(59,110,246,.14);outline:1px solid rgba(59,110,246,.5)}
.rpage__note{min-width:18px;min-height:18px}
.rpage__note:focus-visible,.rpage__note:hover{outline:2px solid rgba(255,170,0,.7)}

/* barre de la selection, au-dessus des miniatures : loin du menu natif
   d'Android, qui s'affiche, lui, au-dessus du texte selectionne */
.rd-selbar{
  flex:0 0 auto;display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;
  padding:8px 10px;background:var(--surface);border-top:1px solid var(--line);
  user-select:none;-webkit-user-select:none;
}
.rd-selbar[hidden]{display:none}
.rd-selbar::-webkit-scrollbar{display:none}
.rd-selbar__b{
  flex:0 0 auto;border:1px solid var(--line);background:var(--surface-2);color:var(--ink);
  border-radius:999px;padding:8px 13px;font:inherit;font-size:var(--t-note);font-weight:560;
}
.rd-selbar__b:active{background:var(--accent-soft)}

/* « Reprise a la page 12 — Revenir au debut » */
.rd-puce{
  position:absolute;left:50%;bottom:calc(86px + var(--safe-b));transform:translateX(-50%);
  z-index:5;display:flex;align-items:center;gap:10px;
  padding:8px 8px 8px 14px;border-radius:999px;
  background:rgba(20,22,28,.88);color:#fff;font-size:var(--t-note);box-shadow:var(--shadow-sm);
  white-space:nowrap;max-width:calc(100% - 24px);
}
.rd-puce[hidden]{display:none}
.rd-puce button{
  border:0;border-radius:999px;padding:6px 11px;font:inherit;font-weight:650;
  background:rgba(255,255,255,.16);color:#fff;
}
/* (.view est deja en position absolue : la puce s'y place sans rien d'autre.) */

/* barre d'un mode (Commenter, Caviarder) : elle prend la place des miniatures */
.rd-outils{
  flex:0 0 auto;background:var(--surface);border-top:1px solid var(--line);
  padding:8px 10px calc(8px + var(--safe-b));
}
.rd-outils[hidden]{display:none}

/* feuille « Naviguer » */
.rd-aller{display:flex;gap:8px;align-items:center;margin:0 6px}
.rd-aller .field{flex:1 1 auto;margin:0}
.rd-plan{display:flex;flex-direction:column;max-height:46vh;overflow:auto;margin:0 0 4px}
.rd-plan__item{
  text-align:left;border:0;background:none;color:var(--ink);font:inherit;font-size:var(--t-second);
  padding:9px 10px;border-radius:8px;line-height:1.35;
}
.rd-plan__item:active,.rd-plan__item:hover{background:var(--surface-2)}

/* proprietes du document */
.props{display:grid;grid-template-columns:auto 1fr;gap:7px 14px;margin:2px 6px 6px;font-size:var(--t-note)}
.props dt{color:var(--ink-3)}
.props dd{margin:0;color:var(--ink);word-break:break-word}

/* couche de recherche : des rectangles poses sur le canevas */
.rpage__hits{position:absolute;inset:0;pointer-events:none;z-index:1}
.rpage__hit{position:absolute;background:rgba(255,196,0,.45);border-radius:2px}
.rpage__hit.is-current{background:rgba(255,128,0,.75)}

/* ------------------------------ bande de miniatures ------------------------------ */
.thumb-strip{
  flex:0 0 auto;
  display:flex;gap:8px;
  padding:8px 10px calc(8px + var(--safe-b));
  background:var(--surface);
  border-top:1px solid var(--line);
  overflow-x:auto;
  scrollbar-width:none;
}
.thumb-strip::-webkit-scrollbar{display:none}
.thumb{
  position:relative;flex:0 0 auto;
  width:44px;height:58px;
  border-radius:4px;overflow:hidden;
  background:#fff;
  border:1px solid var(--line-2);
}
.thumb.is-on{border-color:var(--accent);box-shadow:0 0 0 1.5px var(--accent)}
.thumb canvas,.thumb img{display:block;width:100%;height:100%;object-fit:cover}
.thumb__n{
  position:absolute;left:0;top:0;
  min-width:15px;padding:0 3px;
  background:var(--ink-3);color:#fff;
  font-size:var(--t-legende);font-weight:700;line-height:14px;text-align:center;
  border-bottom-right-radius:4px;
}
.thumb.is-on .thumb__n{background:var(--accent)}

/* ------------------------------ grille de pages (outils) ------------------------------ */
.page-grid{
  display:grid;grid-template-columns:repeat(3,1fr);
  gap:10px;padding:12px;
}
.pcell{
  position:relative;
  aspect-ratio:3/4;
  border-radius:var(--r-sm);overflow:hidden;
  background:#fff;border:2px solid var(--line);
}
.pcell.is-on{border-color:var(--accent)}
.pcell canvas{display:block;width:100%;height:100%;object-fit:contain}
.pcell__n{
  position:absolute;left:4px;bottom:4px;
  padding:1px 6px;border-radius:999px;
  background:rgba(0,0,0,.55);color:#fff;font-size:var(--t-legende);font-weight:700;
}
.pcell__tick{
  position:absolute;right:4px;top:4px;
  width:20px;height:20px;border-radius:50%;
  background:var(--accent);color:var(--accent-ink);
  display:none;place-items:center;
}
.pcell.is-on .pcell__tick{display:grid}
.pcell__tick svg{width:13px;height:13px;stroke-width:3}

/* ------------------------------ lignes de resultat (decouper) ------------------------------ */
.part-row{
  display:flex;align-items:center;gap:10px;
  padding:11px 6px 11px 14px;
  position:relative;
}
.part-row + .part-row::before{
  content:"";position:absolute;left:52px;right:0;top:0;border-top:1px solid var(--line);
}
.part-row__text{flex:1 1 auto;min-width:0}
.part-row__name{display:block;font-size:var(--t-second);font-weight:600;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.part-row__sub{display:block;font-size:var(--t-legende);color:var(--ink-3);margin-top:2px}
.part-row__act{
  flex:0 0 auto;width:38px;height:38px;display:grid;place-items:center;
  color:var(--ink-3);border-radius:50%;
}
.part-row__act--del{color:var(--danger)}

/* ------------------------------ capture photo ------------------------------ */
.cam{
  flex:1 1 auto;min-height:0;position:relative;
  background:#000;display:grid;place-items:center;overflow:hidden;
}
.cam video,.cam canvas{max-width:100%;max-height:100%;display:block}
.cam__shutter{
  position:absolute;z-index:2;left:50%;bottom:22px;transform:translateX(-50%);
  width:68px;height:68px;border-radius:50%;
  background:#fff;box-shadow:0 0 0 4px rgba(255,255,255,.35);
}
.cam__shutter:active{transform:translateX(-50%) scale(.93)}
.cam__count{
  position:absolute;z-index:3;left:14px;bottom:92px;
  min-width:32px;padding:4px 10px;border-radius:999px;
  background:var(--accent);color:var(--accent-ink);font-size:var(--t-note);font-weight:700;
}
/* lot 27 : le cadre trouvé en direct, l'état, la capture auto, les vignettes */
/* ⚠️ La vidéo est peinte dans sa propre couche : sans z-index, le cadre (et, sur un téléphone où
   la vidéo remplit l’écran, les boutons) passent DESSOUS — vu sur une capture, pas dans le DOM. */
.cam video{position:relative;z-index:0}
.cam .cam__net{position:absolute;left:0;top:0;z-index:1;pointer-events:none;max-width:none;max-height:none}
.cam__etat{position:absolute;z-index:2;left:50%;top:14px;transform:translateX(-50%);margin:0;padding:6px 14px;border-radius:999px;
  background:rgba(0,0,0,.6);color:#fff;font-size:var(--t-second);white-space:nowrap;max-width:calc(100% - 32px);overflow:hidden;text-overflow:ellipsis}
.cam__etat:empty{display:none}
.cam__auto{position:absolute;z-index:2;right:16px;bottom:36px;min-width:76px;min-height:44px;padding:0 14px;border-radius:999px;
  background:rgba(0,0,0,.55);color:#fff;font-size:var(--t-second);font-weight:700;border:2px solid rgba(255,255,255,.55)}
.cam__auto.is-on{background:#16803c;border-color:#22c55e}
.cam__vignettes{position:absolute;z-index:2;left:14px;bottom:22px;display:flex;gap:6px}
.cam__vignette{width:48px;height:64px;padding:0;border-radius:6px;overflow:hidden;border:2px solid #fff;background:#222}
.cam__vignette img{width:100%;height:100%;object-fit:cover;display:block}
.cam__apercu{display:block;max-width:100%;max-height:60vh;margin:0 auto;border-radius:8px}
.cam.is-eclair::after{content:'';position:absolute;inset:0;z-index:4;background:#fff;pointer-events:none;animation:cam-eclair .26s ease-out forwards}
@keyframes cam-eclair{from{opacity:.75}to{opacity:0}}
@media (prefers-reduced-motion: reduce){.cam.is-eclair::after{animation:none;opacity:0}}
/* les quatre poignees du recadrage */
.crop{position:relative;touch-action:none}
.crop canvas{display:block;max-width:100%}
.crop__net{position:absolute;inset:0;pointer-events:none}
.crop__h{
  position:absolute;width:30px;height:30px;margin:-15px 0 0 -15px;
  border-radius:50%;background:rgba(232,64,42,.25);
  border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,.5);
  touch-action:none;
}

/* ------------------------------ signature ------------------------------ */
.sign-pad{
  width:100%;height:200px;
  background:#fff;border:1px dashed var(--line-2);
  border-radius:var(--r-md);touch-action:none;display:block;
}
.sign-hint{
  text-align:center;font-size:var(--t-legende);color:var(--ink-3);margin:6px 0 0;
}

/* couche d'annotation posee sur une page du lecteur */
.anno-layer{position:absolute;inset:0;touch-action:none}
.anno{position:absolute;transform-origin:0 0}
.anno img{display:block;width:100%;height:100%}
.anno.is-sel{outline:1.5px dashed var(--accent);outline-offset:2px}
.anno__grip{
  position:absolute;right:-9px;bottom:-9px;
  width:20px;height:20px;border-radius:50%;
  background:var(--accent);border:2px solid #fff;
}

/* ------------------------------ divers ------------------------------ */
.pdf-scroll{flex:1 1 auto;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch}
.pdf-scroll > :last-child{margin-bottom:calc(16px + var(--safe-b))}

.progress{
  height:4px;border-radius:999px;background:var(--surface-3);overflow:hidden;
}
.progress__bar{height:100%;background:var(--accent);width:0;transition:width .2s linear}

.office-view{
  background:var(--surface);
  padding:18px 16px;
  font-size:var(--t-second);line-height:1.6;
}
.office-view table{border-collapse:collapse;width:100%;margin:10px 0;font-size:var(--t-note)}
.office-view td,.office-view th{border:1px solid var(--line);padding:5px 7px}
.office-view img{max-width:100%;height:auto}
.office-slide{
  background:var(--surface);border:1px solid var(--line);
  border-radius:var(--r-md);padding:16px;margin:0 12px 12px;
}
.office-slide__n{font-size:var(--t-legende);font-weight:700;color:var(--ink-3);
  text-transform:uppercase;letter-spacing:.06em;margin-bottom:8px}

/* Titre non modifiable des barres du haut (le titre de l'editeur, lui, est
   un champ de saisie : .doc-title). */
.doc-title-static{
  flex:1 1 auto;min-width:0;
  font-size:var(--t-corps);font-weight:600;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  padding:0 4px;
}

/* ==========================================================================
   Les ajouts qui distinguent Plume : favoris, etiquettes, recherche dans le
   texte, coffre, scellement, comparaison, confidentialite.
   ========================================================================== */

/* ------------------------------ favoris et etiquettes ------------------------------ */
.file-row__star{color:#C9A227;margin-right:5px;font-size:var(--t-note);vertical-align:1px}
.badge-seal{
  display:inline-block;margin-left:7px;
  padding:1px 7px;border-radius:999px;
  background:#7B4FD3;color:#fff;
  font-size:var(--t-legende);font-weight:700;vertical-align:1px;
}
.tag-pill{
  display:inline-block;margin-left:6px;
  padding:1px 8px;border-radius:999px;
  border:1px solid var(--line-2);
  color:var(--ink-3);font-size:var(--t-legende);font-weight:600;
  vertical-align:1px;
}
/* La rangee d'etiquettes suit celle des types : plus discrete, sans fond. */
.chip-row--tags{padding-top:0;padding-bottom:10px}
.chip--tag{min-height:30px;padding:0 13px;font-size:var(--t-legende);font-weight:600}
.chip-row--wrap{flex-wrap:wrap;overflow:visible;padding:2px 0 0}

/* ------------------------------ resultats dans le texte ------------------------------ */
.hits{margin:14px 12px 0}
.hits__head{
  margin:0 4px 8px;
  font-size:var(--t-legende);font-weight:700;color:var(--ink-3);
  text-transform:uppercase;letter-spacing:.06em;
}
.hit{
  width:100%;display:flex;align-items:flex-start;gap:12px;
  padding:11px 12px;text-align:left;
  background:var(--surface);
  border-radius:var(--r-md);
  margin-bottom:7px;
  box-shadow:var(--shadow-sm);
}
.hit:active{background:var(--surface-2)}
.hit__icon{flex:0 0 auto}
.hit__icon .file-glyph{width:22px;height:27px}
.hit__icon .file-glyph text{font-size:var(--t-note)}
.hit__text{flex:1 1 auto;min-width:0}
.hit__name{
  display:block;font-size:var(--t-note);font-weight:650;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.hit__snip{
  display:block;margin-top:3px;
  font-size:var(--t-legende);line-height:1.5;color:var(--ink-2);
}
.hit__snip mark{background:var(--accent-soft);color:var(--accent-texte);font-weight:700;border-radius:3px;padding:0 2px}
.hit__page{
  flex:0 0 auto;align-self:center;
  font-size:var(--t-legende);font-weight:700;color:var(--ink-3);
  font-variant-numeric:tabular-nums;
}

/* ------------------------------ coffre ------------------------------ */
.vault-note{
  margin:10px 2px 0;
  font-size:var(--t-legende);line-height:1.55;color:var(--ink-3);
}
.vault-note.is-bad{color:var(--danger);font-weight:600}
.vault-note code{
  font-family:ui-monospace,Menlo,Consolas,monospace;
  font-size:var(--t-legende);background:var(--surface-2);
  padding:1px 5px;border-radius:4px;
}

/* ------------------------------ scellement ------------------------------ */
.seal-ok{padding:34px 20px;text-align:center}
.seal-ok svg{
  width:56px;height:56px;color:#1E8E3E;
  fill:none;stroke:currentColor;stroke-width:1.7;
  stroke-linecap:round;stroke-linejoin:round;
}
.seal-ok h3{margin:14px 0 6px;font-size:var(--t-titre)}
.seal-ok p{margin:0 0 16px;font-size:var(--t-note);color:var(--ink-3);line-height:1.55}
.seal-label{
  margin:16px 2px 6px;font-size:var(--t-legende);font-weight:700;
  color:var(--ink-3);text-transform:uppercase;letter-spacing:.06em;
}
.seal-hash{
  display:block;
  font-family:ui-monospace,Menlo,Consolas,monospace;
  font-size:var(--t-legende);line-height:1.8;letter-spacing:.02em;
  word-break:break-all;
  background:var(--surface-2);
  border-radius:var(--r-md);
  padding:12px 14px;color:var(--ink);
}
.seal-state{
  padding:13px 14px;border-radius:var(--r-md);
  background:var(--surface-2);
  font-size:var(--t-note);line-height:1.55;color:var(--ink-2);
}
.seal-state.is-ok{background:#e7f5ec;color:#136b31}
.seal-state.is-bad{background:#fdecea;color:#a4241c}
:root:not([data-theme="light"]) .seal-state.is-ok{background:#123021;color:#8fe0ad}
:root:not([data-theme="light"]) .seal-state.is-bad{background:#3a1b18;color:#f4a49c}

/* ------------------------------ comparaison ------------------------------ */
.cmp-head{padding:18px 16px 4px}
.cmp-files{margin:0;font-size:var(--t-note);color:var(--ink-3);line-height:1.6}
.cmp-files span{font-weight:650;color:var(--ink)}
.cmp-files em{font-style:normal;opacity:.6;margin:0 4px}
.cmp-verdict{margin:8px 0 0;font-size:var(--t-second);line-height:1.5}
.cmp-head.is-same .cmp-verdict{color:#1E8E3E;font-weight:650}
.cmp-note{
  margin:14px 16px;font-size:var(--t-note);line-height:1.6;color:var(--ink-3);
}
.cmp-page{
  margin:10px 12px;background:var(--surface);
  border-radius:var(--r-md);box-shadow:var(--shadow-sm);overflow:hidden;
}
.cmp-page summary{
  display:flex;align-items:center;gap:10px;
  padding:12px 14px;cursor:pointer;
  font-size:var(--t-second);font-weight:620;
}
.cmp-page summary::-webkit-details-marker{display:none}
.cmp-p{flex:1 1 auto}
.cmp-plus{color:#1E8E3E;font-variant-numeric:tabular-nums}
.cmp-minus{color:#D83A41;font-variant-numeric:tabular-nums}
.cmp-text{
  margin:0;padding:0 14px 14px;
  font-size:var(--t-note);line-height:1.7;
}
.cmp-text ins{background:#e2f5e8;color:#136b31;text-decoration:none;border-radius:3px;padding:0 2px}
.cmp-text del{background:#fdeceb;color:#a4241c;border-radius:3px;padding:0 2px}
.cmp-same{color:var(--ink-3)}
.cmp-gap{font-style:italic;opacity:.65}
:root:not([data-theme="light"]) .cmp-text ins{background:#123021;color:#8fe0ad}
:root:not([data-theme="light"]) .cmp-text del{background:#3a1b18;color:#f4a49c}

/* ------------------------------ confidentialite ------------------------------ */
.privacy{padding:6px 16px 24px}
.privacy-hero{
  display:grid;place-items:center;gap:2px;
  padding:26px 18px 22px;margin-bottom:16px;
  border-radius:var(--r-lg);
  background:var(--surface-2);
  text-align:center;
}
.privacy-hero svg{
  width:42px;height:42px;fill:none;stroke:currentColor;stroke-width:1.6;
  stroke-linecap:round;stroke-linejoin:round;
}
.privacy-hero.is-ok{color:#1E8E3E}
.privacy-hero.is-bad{color:#D83A41}
.privacy-hero__n{
  margin:6px 0 0;font-size:46px;font-weight:700;line-height:1;
  letter-spacing:-.03em;font-variant-numeric:tabular-nums;
}
.privacy-hero__t{
  margin:6px 0 0;max-width:22em;
  font-size:var(--t-note);line-height:1.5;color:var(--ink-2);
}
.privacy .stat-grid{margin-top:16px}
.privacy-list{margin-top:20px}
.privacy-list h3{
  margin:0 0 8px;font-size:var(--t-legende);font-weight:700;color:var(--ink-3);
  text-transform:uppercase;letter-spacing:.06em;
}
.privacy-list p{margin:0 0 10px;font-size:var(--t-note);line-height:1.6;color:var(--ink-2)}

/* ------------------------------ tuto des outils ------------------------------ */
/* Le nom d'un GROUPE et le nom d'un OUTIL ne doivent pas se ressembler :
   en heritant tous deux du h3 de `.privacy-list`, ils sortaient identiques
   et la hierarchie disparaissait. */
.tuto__groupe{
  margin:28px 0 8px;font-size:var(--t-legende);font-weight:700;color:var(--accent-texte);
  text-transform:uppercase;letter-spacing:.06em;
}
.tuto__outil{
  margin:0 0 3px;font-size:var(--t-second);font-weight:650;color:var(--ink);
  text-transform:none;letter-spacing:0;
}
.tuto__quoi{margin:0 0 4px;font-size:var(--t-note);line-height:1.6;color:var(--ink-2)}
.tuto__limite{margin:0 0 18px;font-size:var(--t-note);line-height:1.55;color:var(--ink-3)}
.tuto__pied{margin-top:28px;padding-top:18px;border-top:1px solid var(--line)}

/* ------------------------------ bandeau lateral ------------------------------ */
/* Une porte discrete vers une liste voisine (les .docx depuis les documents).
   Ni une carte, ni un bouton d'action : une ligne qu'on remarque sans qu'elle
   reclame l'attention. */
.side-band{
  display:flex;align-items:center;gap:10px;width:100%;
  margin:0 0 10px;padding:11px 14px;
  background:var(--surface);
  border-radius:var(--r-md);
  box-shadow:var(--shadow-sm);
  text-align:left;
}
.side-band:active{background:var(--surface-2)}
.side-band__icon{
  flex:0 0 auto;width:26px;height:26px;border-radius:8px;
  background:#2B7CD3;
  display:grid;place-items:center;
  color:#fff;font-size:var(--t-legende);font-weight:800;
}
.side-band__icon::before{content:"DOC"}
.side-band__t{flex:1 1 auto;font-size:var(--t-second);font-weight:600}
.side-band__n{
  font-size:var(--t-legende);font-weight:700;color:var(--ink-3);
  font-variant-numeric:tabular-nums;
}
.side-band__go{width:18px;height:18px;color:var(--ink-3);flex:0 0 auto}

/* Le champ de recherche de la boite a outils, colle sous la barre du haut. */
.tl-field{margin:8px 12px 4px;flex:0 0 auto}

/* ==========================================================================
   Publicite et version payante.
   ========================================================================== */
.ad-slot{margin:14px 12px 0;min-height:0}
/* Le bandeau « maison » : celui que Plume affiche pour elle-meme quand la
   regie n'est pas configuree, refusee, ou hors ligne. */
.ad-house{
  display:flex;align-items:center;gap:10px;width:100%;
  padding:12px 14px;
  background:var(--surface);
  border:1px dashed var(--line-2);
  border-radius:var(--r-md);
  text-align:left;
}
.ad-house__t{font-size:var(--t-second);font-weight:650}
.ad-house__d{flex:1 1 auto;font-size:var(--t-legende);color:var(--ink-3)}
.ad-house__p{
  font-size:var(--t-second);font-weight:800;color:var(--accent-texte);
  padding:3px 10px;border-radius:999px;background:var(--accent-soft);
}
@media (max-width:400px){
  .ad-house{flex-wrap:wrap;gap:4px 10px}
  .ad-house__d{flex-basis:100%}
}

/* L'ecran Pro (lot 19) : deux formules, la licence, ce qu'on gagne. */
.store__raison{margin:0 0 12px;padding:10px 12px;border-radius:var(--r-md);background:var(--accent-soft);color:var(--ink);font-size:var(--t-second);font-weight:600;line-height:1.45}
.store__plans{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 14px}
.store__plan{display:flex;flex-direction:column;gap:3px;align-items:flex-start;text-align:left;padding:12px;border-radius:16px;border:1.5px solid var(--line-2);background:var(--surface);color:var(--ink);font:inherit}
.store__plan.is-on{border-color:var(--accent);background:var(--accent-soft)}
.store__plan-t{font-size:var(--t-note);font-weight:700;color:var(--ink-2)}
.store__plan-p{font-size:var(--t-titre);font-weight:800;letter-spacing:-.02em}
.store__plan-p small{font-size:var(--t-legende);font-weight:600;color:var(--ink-3)}
.store__plan-n{font-size:var(--t-legende);color:var(--ink-3);line-height:1.35}
.store__plans--un{grid-template-columns:1fr}
/* Un titre et sa precision s'EMPILENT (le .menu-item de base les range cote a cote, pour une icone). */
.store .menu-item{display:block}
.store__licence,.store__autre{margin-top:8px}
/* Lot 88 : les trois offres. Sur un téléphone, l'édition passe EN PREMIER (order) ; à partir de 720 px, au centre. */
.store__offres{display:grid;gap:10px;margin:0 0 10px}
.store__offre{position:relative;display:flex;flex-direction:column;gap:6px;padding:14px;border-radius:16px;border:1.5px solid var(--line-2);background:var(--surface);color:var(--ink)}
.store__offre h3{margin:0;font-size:var(--t-corps)}
.store__offre ul{margin:0;padding-left:18px;font-size:var(--t-note);line-height:1.45;color:var(--ink-2);flex:1}
.store__offre .btn{width:100%;margin-top:4px}
.store__prix{margin:0;font-size:var(--t-titre);font-weight:800;letter-spacing:-.02em;text-align:left}
.store__prix small{margin-left:4px;font-size:var(--t-legende);font-weight:600;letter-spacing:0;color:var(--ink-3)}
.store__ou{margin:-4px 0 0;font-size:var(--t-legende);color:var(--ink-3)}
.store__offre.is-vedette{order:-1;border:2px solid var(--accent);background:var(--accent-soft);padding-top:22px}
.store__ruban{position:absolute;top:-10px;left:14px;padding:2px 10px;border-radius:999px;background:var(--accent);color:var(--accent-ink);font-size:var(--t-legende);font-weight:700}
@media (min-width:720px){.store__offres{grid-template-columns:1fr 1.15fr 1fr;align-items:stretch}.store__offre.is-vedette{order:0}}
/* La banniere native (AdMob) se pose par-dessus le bas de l'ecran : on lui fait place. */
body.avec-banniere{--banniere-h:60px}
body.avec-banniere .fab-bar{bottom:var(--banniere-h)}
body.avec-banniere .library,body.avec-banniere .pdf-scroll{padding-bottom:calc(120px + var(--banniere-h))}
/* L'ecran d'achat. */
.store__prix{margin:6px 0 0;font-size:40px;font-weight:800;letter-spacing:-.03em;text-align:center}
.store__sous{margin:2px 0 16px;text-align:center;font-size:var(--t-note);color:var(--ink-3)}
.store__liste{list-style:none;margin:0;padding:0}
.store__liste li{display:block;padding:9px 0;border-top:1px solid var(--line)}
.store__liste li:first-child{border-top:0}
.store__liste b{display:block;font-size:var(--t-second);font-weight:650}
.store__liste span{display:block;margin-top:2px;font-size:var(--t-legende);color:var(--ink-3);line-height:1.5}
.store__faux{
  margin:14px 0 0;padding:10px 12px;border-radius:var(--r-md);
  background:var(--surface-2);font-size:var(--t-legende);line-height:1.55;color:var(--ink-2);
}
/* Lot 21 : l'empreinte de la clé du professeur (sa licence personnelle y est liée). */
.store__kid{margin:12px 2px 0;font-size:var(--t-note);line-height:1.55;color:var(--ink-2)}
.store__kid code{font:600 var(--t-note)/1 ui-monospace,Consolas,monospace;padding:2px 6px;border-radius:6px;background:var(--surface-3);color:var(--ink);user-select:all}
.store__kid small{color:var(--ink-3)}
/* Lot 21 : les outils que le professeur permet pendant un contrôle. */
.cl-regles{margin:14px 0 4px;padding:10px 12px;border:1px solid var(--line);border-radius:var(--r-md);background:var(--surface-2)}
.cl-regles summary{cursor:pointer;font-weight:650;font-size:var(--t-second);color:var(--ink)}
.cl-regles__n{margin-left:6px;font-weight:500;font-size:var(--t-legende);color:var(--ink-3)}
.cl-regles .ex-note{margin:8px 0 4px}
/* Lot 21 : la ligne « licence » du sujet reçu. */
.cl-pass{margin:10px 0 0;font-size:var(--t-note);line-height:1.5;color:var(--ink-2)}
.cl-pass.is-ok{color:var(--ok,#1a7f4b)}
.cl-pass.is-bad{color:var(--danger,#b3261e)}
.consent p{margin:0 0 10px;font-size:var(--t-note);line-height:1.6;color:var(--ink-2)}

/* ==========================================================================
   Le tableur.
   ========================================================================== */
.sg-bar{
  display:flex;align-items:center;gap:8px;
  padding:6px 12px 8px;flex:0 0 auto;
  border-bottom:1px solid var(--line);
}
/* Lot 91 : la barre de format du tableur — défilable sur un téléphone, des cibles de 40 px. */
.sg-format{display:flex;gap:2px;padding:4px 8px;flex:0 0 auto;overflow-x:auto;scrollbar-width:none;border-bottom:1px solid var(--line)}
.sg-format::-webkit-scrollbar{display:none}
/* Lot 198 : 44 px sous le doigt (40 avant) ; à 360 px la barre défile, comme celle du texte. */
.sg-format__b{position:relative;flex:none;width:44px;height:44px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;color:var(--ink-2);background:none}
.sg-format__b svg{width:20px;height:20px}
.sg-format__b[aria-pressed="true"],.sg-format__b.is-on{background:var(--accent-soft);color:var(--accent-texte,var(--ink))}
.sg-format__c{position:absolute;left:10px;right:10px;bottom:5px;height:4px;border-radius:2px;box-shadow:inset 0 0 0 1px var(--line-2)}
.sg-couleurs{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:8px}
.sg-couleur{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 6px;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font-size:var(--t-note)}
.sg-couleur i{width:34px;height:34px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2)}
.sg-couleur--aucune{background:linear-gradient(135deg,transparent 46%,var(--danger) 46% 54%,transparent 54%),var(--surface)}
/* La poignée de recopie : un carré de 10 px, une cible de 36 px. */
.sg-poignee{position:absolute;top:0;left:0;z-index:4;width:10px;height:10px;background:var(--accent);border:2px solid var(--surface);border-radius:2px;touch-action:none;cursor:crosshair}
.sg-poignee::before{content:"";position:absolute;inset:-13px}
.sg-apercu{position:absolute;top:0;left:0;z-index:3;border:2px dashed var(--accent);pointer-events:none;border-radius:2px}

.sg-ref{
  flex:0 0 auto;min-width:52px;padding:6px 8px;
  border-radius:var(--r-sm,8px);background:var(--surface-2);
  font-size:var(--t-note);font-weight:700;text-align:center;
  font-variant-numeric:tabular-nums;color:var(--ink-2);
}
.sg-input{
  flex:1 1 auto;min-width:0;min-height:38px;
  padding:0 12px;border-radius:999px;
  background:var(--surface-2);
  font-size:var(--t-second);
}

/* La grille : deux en-tetes figes et une zone qui defile dans les deux sens.
   Les en-tetes ne defilent pas eux-memes, ils sont TRANSLATES par le code —
   un position:sticky en deux dimensions ne tient pas sur tous les moteurs. */
.sg-wrap{position:relative;flex:1 1 auto;min-height:0;overflow:hidden;background:var(--surface)}
.sg-corner{
  position:absolute;left:0;top:0;height:28px;z-index:3;
  background:var(--surface-2);border-right:1px solid var(--line);border-bottom:1px solid var(--line);
}
.sg-colhead{
  position:absolute;left:46px;right:0;top:0;height:28px;z-index:2;
  overflow:hidden;background:var(--surface-2);border-bottom:1px solid var(--line);
}
.sg-rowhead{
  position:absolute;left:0;top:28px;bottom:0;width:46px;z-index:2;
  overflow:hidden;background:var(--surface-2);border-right:1px solid var(--line);
}
.sg-scroll{
  position:absolute;left:46px;right:0;top:28px;bottom:0;
  overflow:auto;-webkit-overflow-scrolling:touch;
}
.sg-canvas{position:relative;contain:layout paint}

.hcol,.hrow{
  position:absolute;top:0;left:0;
  display:grid;place-items:center;
  font-size:var(--t-legende);font-weight:700;color:var(--ink-3);
  font-variant-numeric:tabular-nums;
}
.hcol{height:28px}
.hrow{height:34px;width:46px}
.hcol.is-sel,.hrow.is-sel{color:var(--accent-ink);background:var(--accent)}

.cell{
  position:absolute;top:0;left:0;height:34px;
  display:flex;align-items:center;
  padding:0 7px;
  border-right:1px solid var(--line);border-bottom:1px solid var(--line);
  font-size:13.5px;line-height:1.2;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  background:var(--surface);
  /* Lot 100 : une case a sa taille (34 px, largeur posée par grid.js) : son contenu ne peut rien
     déplacer autour d'elle. Le moteur ne remet plus en page toute la toile pour une case écrite. */
  contain:strict;
}
.cell--num{justify-content:flex-end;font-variant-numeric:tabular-nums}
.cell--f{color:var(--ink)}
.cell--f::after{
  content:"";position:absolute;right:2px;top:2px;
  width:0;height:0;border-top:4px solid var(--accent);border-left:4px solid transparent;
}
.cell--err{color:var(--danger);font-weight:600}
.cell.is-sel{
  outline:2px solid var(--accent);outline-offset:-2px;
  background:var(--accent-soft);
}

.sg-foot{
  display:flex;align-items:center;gap:6px;flex:0 0 auto;
  padding:6px 8px calc(6px + var(--safe-b));
  border-top:1px solid var(--line);background:var(--surface);
}
/* Lot 198 : les onglets restent des pastilles de 30 px ; la bande qui les porte prend 7 px de marge
   intérieure (rendus par une marge négative) pour que leur zone de toucher, 44 px, ne soit pas rognée. */
.sg-tabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;flex:1 1 auto;padding-block:7px;margin-block:-7px}
.sg-tabs::-webkit-scrollbar{display:none}
.sg-tab{
  flex:0 0 auto;min-height:30px;padding:0 12px;border-radius:999px;
  border:1px solid var(--line-2);background:var(--surface);
  font-size:var(--t-note);font-weight:600;color:var(--ink-2);
  white-space:nowrap;
}
.sg-tab{position:relative}
.sg-tab::before{content:"";position:absolute;inset:-8px -1px}      /* 7 px, et le filet de 1 px de la pastille */
.sg-tab.is-on{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}

/* Lot 28 : plage, fusions, volets figes, filtre. Les cellules figees sont
   reposees par le code a la position du defilement : elles passent DEVANT. */
.sg-scroll:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
/* Pour les lecteurs d'écran seulement : présent, mais hors de la vue. */
.sg-annonce{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
.cell.is-in{background:var(--accent-soft)}
.cell--fusion{align-items:center;white-space:normal}
.cell--fige{z-index:1}
.cell--coin{z-index:2}
.cell--fige-bas{box-shadow:0 2px 0 var(--line-2)}
.cell--fige-droite{box-shadow:2px 0 0 var(--line-2)}
.cell--fige-bas.cell--fige-droite{box-shadow:2px 2px 0 var(--line-2)}
.cell--filtre{padding-right:26px}
.cell--filtre::before{
  content:"";position:absolute;right:5px;top:50%;width:16px;height:16px;margin-top:-8px;
  border-radius:4px;background:var(--surface-2);border:1px solid var(--line-2);
}
.cell--filtre::after{
  content:"";position:absolute;right:10px;top:50%;margin-top:-2px;
  border-left:3.5px solid transparent;border-right:3.5px solid transparent;border-top:5px solid var(--ink-2);
}
.cell--filtre.is-filtre-on::before{background:var(--accent);border-color:var(--accent)}
.cell--filtre.is-filtre-on::after{border-top-color:var(--accent-ink)}
.cell--filtre.cell--f::after{right:10px;top:50%}
.hcol.is-fige,.hrow.is-fige{z-index:1;background:var(--surface-2)}
.hrow.is-filtre{color:var(--accent)}

/* Le dossier partagé (lot 28). */
.dos{display:flex;flex-direction:column;gap:10px;padding:2px 16px 14px}
.dos__note{margin:0;font-size:var(--t-note);line-height:1.55;color:var(--ink-2)}
.dos__liste{display:flex;flex-direction:column;max-height:48vh;overflow:auto;border:1px solid var(--line);border-radius:var(--r-sm,8px)}
.dos__f{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:10px 12px;text-align:left;border-bottom:1px solid var(--line);min-height:48px}
.dos__f:last-child{border-bottom:0}
.dos__f:hover,.dos__f:focus-visible{background:var(--surface-2)}
.dos__nom{font-size:var(--t-second);font-weight:600;color:var(--ink);word-break:break-word}
.dos__meta{font-size:var(--t-legende);color:var(--ink-3);font-variant-numeric:tabular-nums}
.dos__actions{display:flex;flex-direction:column;gap:6px}

/* Les feuilles d'outils du tableur. */
.sg-form{display:flex;flex-direction:column;gap:10px;padding:2px 16px 12px}
.sg-ligne{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap}
.sg-ligne > *{flex:1 1 140px;min-width:0}
.sg-champ{display:flex;flex-direction:column;gap:4px;font-size:var(--t-legende);font-weight:600;color:var(--ink-2)}
.sg-champ select,.sg-champ input{
  min-height:40px;padding:0 10px;border-radius:var(--r-sm,8px);
  border:1px solid var(--line-2);background:var(--surface);color:var(--ink);font-size:var(--t-second);font-weight:400;
}
.sg-coche{display:flex;align-items:center;gap:8px;min-height:36px;font-size:var(--t-second);color:var(--ink)}
.sg-coche input{width:18px;height:18px;accent-color:var(--accent)}
.sg-valeurs{max-height:38vh;overflow:auto;border:1px solid var(--line);border-radius:var(--r-sm,8px);padding:2px 10px}
.sg-n{margin-left:auto;font-size:var(--t-legende);color:var(--ink-3);font-variant-numeric:tabular-nums}
.sg-note{margin:0;font-size:var(--t-legende);line-height:1.5;color:var(--ink-3)}
.sg-regles{display:flex;flex-direction:column;gap:6px}
.sg-regle{display:flex;align-items:center;gap:8px;font-size:var(--t-note);color:var(--ink)}
.sg-regle > span:nth-child(2){flex:1 1 auto;min-width:0}
.sg-pastille{flex:0 0 auto;display:grid;place-items:center;width:30px;height:24px;border-radius:5px;border:1px solid var(--line-2);font-size:var(--t-legende);font-weight:700}

/* ------------------------------ graphiques ------------------------------ */
.chart-box{padding:14px 12px 4px}
.chart{width:100%;height:auto;display:block}
.chart__grid{stroke:var(--line);stroke-width:1}
.chart__axis{stroke:var(--ink-3);stroke-width:1.5}
.chart__line{fill:none;stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round}
.chart__tick{font-size:var(--t-legende);fill:var(--ink-3);text-anchor:end}
.chart__lbl{font-size:var(--t-legende);fill:var(--ink-2);text-anchor:middle}
.chart__lbl--left{text-anchor:start}
.chart__title{font-size:var(--t-corps);font-weight:600;fill:var(--ink)}

/* ==========================================================================
   Les diapositives.
   ========================================================================== */
.sl-wrap{
  flex:1 1 auto;min-height:0;overflow:auto;
  /* Lot 191 : « safe » — zoomée plus grande que l'écran, la scène part du bord, qu'on atteint en défilant. */
  display:flex;align-items:safe center;justify-content:safe center;
  padding:12px;background:var(--surface-2);
}
/* La scene garde le rapport de la diapositive. `container-type:size` autorise
   les unites cqw : la taille des caracteres suit alors la LARGEUR de la scene,
   si bien qu'une vignette, l'editeur et le plein ecran rendent la meme
   composition sans un seul calcul en JavaScript. */
/* Lot 191 (rapport n° 19) : --sl-zoom (canvas.js, pincement, double appui) agrandit la scène ; sa
   proportion est un aspect-ratio — padding-top se rapportait à la largeur du parent, pas à la scène. */
.sl-stage{
  position:relative;flex:none;width:calc(100% * var(--sl-zoom, 1));max-width:calc(820px * var(--sl-zoom, 1));
  aspect-ratio:var(--sl-ar, 16 / 9);
  box-shadow:var(--shadow-md, 0 6px 24px rgba(0,0,0,.14));
  border-radius:var(--r-sm, 6px);
  overflow:hidden;background:#fff;
}
.sl-scene{
  position:absolute;inset:0;
  container-type:size;
}
.slobj{position:absolute;overflow:hidden}
.slobj--texte{display:flex;flex-direction:column;justify-content:flex-start}
/* Lot 186 : l'indice d'un espace réservé, dans l'éditeur seulement (rendu.js). */
/* Lot 195 : plus d'opacité (.42 donnait un contraste de 2,6) — la couleur, un gris opaque, est calculée
   par rendu.js (couleurIndice) pour atteindre 4,6 sur chaque thème. L'indice reste un indice : gris et penché. */
.sl-indice{font-style:italic}
/* Lot 185 : un mot ne se casse pas (rendu.js le pose aussi en ligne) : son cadre rapetisse (ajusterTextes). */
.slobj p{margin:0;line-height:1.25;overflow-wrap:normal;hyphens:manual}
.slobj img{width:100%;height:100%;object-fit:contain;display:block}
.slobj.is-sel{outline:2px dashed var(--accent);outline-offset:2px;cursor:move}
/* Lot 191 : l'objet choisi se glisse au doigt, même zoomé (ailleurs, le doigt fait défiler). */
.slobj.is-sel{touch-action:none}
.sl-zoom{flex:none;min-height:40px;padding:0 12px;border-radius:999px;border:1px solid var(--line);
  font-size:13px;font-weight:600;font-variant-numeric:tabular-nums;color:var(--ink)}
.sl-zoom[hidden]{display:none}

/* Lot 28 : formes, tableaux, formules (dessinés par js/slides/rendu.js). */
.slobj--forme{overflow:visible}
.slforme{position:absolute;inset:0;width:100%;height:100%;overflow:visible;display:block}
.slforme__texte{position:absolute;inset:6%;display:flex;flex-direction:column;justify-content:center}
.slobj--tableau{overflow:hidden}
.sltab{width:100%;height:100%;border-collapse:collapse;table-layout:fixed;line-height:1.2}
.sltab th,.sltab td{border:0.12cqw solid var(--sltab-trait,rgba(0,0,0,.3));padding:0.5cqw 0.8cqw;text-align:left;vertical-align:middle;overflow:hidden;word-wrap:break-word}
.sltab th{font-weight:700}
.slobj--formule{display:flex;align-items:center;justify-content:center}
.slmath{line-height:1}
.slobj--anim::after{
  content:attr(data-ordre);position:absolute;left:2px;top:2px;
  min-width:18px;height:18px;padding:0 4px;border-radius:9px;
  background:var(--accent);color:var(--accent-ink);font:700 11px/18px system-ui,sans-serif;text-align:center;
}
.sl-form{display:flex;flex-direction:column;gap:10px;padding:2px 16px 12px}
.sl-lab{margin:4px 0 0;font-size:12.5px;font-weight:700;color:var(--ink-2)}
.sl-couleurs{display:flex;flex-wrap:wrap;gap:8px}
.sl-couleur{width:34px;height:34px;border-radius:50%;border:2px solid var(--line-2);font-size:15px;color:var(--ink-2)}
.sl-couleur.is-on{outline:3px solid var(--accent);outline-offset:2px}
.sl-ta--mono{font-family:ui-monospace,Consolas,monospace;font-size:13.5px}

/* En présentation : objets « au clic » et transitions. */
.slobj--cache{visibility:hidden}
.slobj.apparait{animation:sl-fondu .35s ease}
.present__stage{overflow:hidden}
.present__scene.tr-fondu{animation:sl-fondu .5s ease}
.present__scene.tr-poussee{animation:sl-pousse .45s ease-out}
.present__scene.tr-balayage{animation:sl-balaye .6s ease-out}
@keyframes sl-fondu{from{opacity:0}to{opacity:1}}
@keyframes sl-pousse{from{transform:translateX(100%)}to{transform:none}}
@keyframes sl-balaye{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}
@media (prefers-reduced-motion:reduce){
  .present__scene.tr-fondu,.present__scene.tr-poussee,.present__scene.tr-balayage,.slobj.apparait{animation:none}
}
.slobj__grip{
  position:absolute;right:-8px;bottom:-8px;
  width:20px;height:20px;border-radius:50%;
  background:var(--accent);border:2px solid #fff;
  cursor:nwse-resize;touch-action:none;
}

.sl-foot{
  display:flex;align-items:center;gap:6px;flex:0 0 auto;
  padding:6px 8px calc(6px + var(--safe-b));
  border-top:1px solid var(--line);background:var(--surface);
}
.sl-strip{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;flex:1 1 auto}
.sl-strip::-webkit-scrollbar{display:none}
.slthumb{
  flex:0 0 auto;width:96px;height:56px;
  border-radius:var(--r-sm, 6px);
  border:1px solid var(--line-2);
  display:flex;flex-direction:column;justify-content:center;
  padding:4px 6px;text-align:left;overflow:hidden;
}
.slthumb.is-on{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
.slthumb__n{font-size:var(--t-legende);font-weight:700;opacity:.55}
.slthumb__t{font-size:var(--t-legende);line-height:1.2;overflow:hidden;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}

.sl-ta{
  width:100%;min-height:120px;padding:12px 14px;
  border-radius:var(--r-md);background:var(--surface-2);
  font-size:15px;line-height:1.5;resize:vertical;
}
.sl-swatch{
  display:inline-block;width:14px;height:14px;border-radius:4px;
  border:2px solid;margin-right:6px;vertical-align:-2px;
}
.sl-lock{font-size:10.5px;font-weight:800;color:var(--accent-texte)}

/* ------------------------------ mode presentateur ------------------------------ */
.present{
  position:fixed;inset:0;z-index:70;background:#000;
  display:flex;flex-direction:column;
}
.present__stage{
  flex:1 1 auto;min-height:0;position:relative;
  display:flex;align-items:center;justify-content:center;
}
.present__scene{
  position:relative;container-type:size;
  width:100%;aspect-ratio:16/9;max-height:100%;
  max-width:calc(100vh * 16 / 9);
}
.present__bar{
  flex:0 0 auto;display:flex;align-items:center;gap:12px;
  padding:8px 14px calc(8px + var(--safe-b));
  background:rgba(0,0,0,.85);color:#fff;
}
.present__x{width:40px;height:40px;border-radius:50%;color:#fff;font-size:17px}
.present__chrono{font-variant-numeric:tabular-nums;font-size:15px;font-weight:700}
.present__n{flex:1 1 auto;text-align:center;font-size:13px;opacity:.8;
  font-variant-numeric:tabular-nums}
.present__nb{
  padding:6px 12px;border-radius:999px;border:1px solid rgba(255,255,255,.35);
  color:#fff;font-size:12.5px;font-weight:600;
}
/* Lot 189 (rapport n° 19) : la barre tient dans l'écran. Large, Vue présentateur, Laser et Sur la
   télé restent dans la rangée ; sous 440 px, ils s'ouvrent depuis « ⋯ », posés au-dessus de la barre. */
.present__extra{display:contents}
.present__plus{display:none;min-width:40px}
@media (max-width:439px){
  .present__bar{position:relative;gap:8px}
  .present__plus{display:inline-flex;justify-content:center}
  .present__extra{display:none;position:absolute;right:10px;bottom:calc(100% + 8px);flex-direction:column;align-items:stretch;gap:8px;
    padding:10px;border-radius:14px;background:rgba(0,0,0,.9)}
  .present__bar.plus-ouvert .present__extra{display:flex}
}
.present__notes{
  flex:0 0 auto;max-height:34vh;overflow:auto;
  padding:14px 16px calc(14px + var(--safe-b));
  background:#15171c;color:#e8eaee;
  font-size:15px;line-height:1.6;white-space:pre-wrap;
  border-top:1px solid rgba(255,255,255,.12);
}

/* ==========================================================================
   Lot 6 — marque, facture, lecture a voix haute, modeles
   ========================================================================== */

/* ------------------------------ theme de marque ------------------------------ */
.br-form{padding:4px 2px 8px}
.br-logo{
  height:96px;border:1px dashed var(--line-2);border-radius:var(--r-md);
  display:flex;align-items:center;justify-content:center;background:var(--surface-2);
  overflow:hidden;
}
.br-logo img{max-width:80%;max-height:78px;object-fit:contain}
.br-logo-vide{font-size:var(--t-note);color:var(--ink-3)}
.br-logo-btns{display:flex;gap:10px;margin:10px 0 14px}
.br-logo-btns .btn{flex:1;min-height:40px;font-size:var(--t-second)}
.br-colors{display:flex;gap:12px;margin-bottom:6px}
.br-color{flex:1;display:flex;flex-direction:column;gap:6px;font-size:var(--t-legende);color:var(--ink-3)}
.br-color input[type=color]{
  width:100%;height:40px;border:1px solid var(--line-2);border-radius:10px;
  background:none;padding:2px;
}
.br-field{display:flex;flex-direction:column;gap:5px;margin-bottom:11px}
.br-field span{font-size:var(--t-legende);color:var(--ink-3)}
.br-field input{
  width:100%;min-height:42px;padding:0 12px;border:1px solid var(--line-2);
  border-radius:10px;background:var(--surface);color:var(--ink);font-size:var(--t-second);
}
.br-note{font-size:var(--t-legende);color:var(--ink-3);line-height:1.5;margin:6px 0 0}

/* ------------------------------ modeles verrouilles ------------------------------ */
.tpl-lock{
  display:inline-block;margin-left:6px;padding:1px 7px;border-radius:99px;
  background:var(--accent-soft);color:var(--accent-texte);font-size:var(--t-legende);font-weight:700;
  vertical-align:middle;
}
.tpl-card--lock{opacity:.82}

/* ------------------------------ facture ------------------------------ */
.inv{padding:14px 16px 24px}
.inv-sec{border:1px solid var(--line);border-radius:var(--r-md);margin-bottom:12px;background:var(--surface)}
.inv-sec > summary{
  padding:12px 14px;font-size:var(--t-second);font-weight:620;cursor:pointer;
  list-style:none;display:flex;align-items:center;justify-content:space-between;
}
.inv-sec > summary::after{content:'▾';color:var(--ink-3);font-size:var(--t-note)}
.inv-sec[open] > summary::after{content:'▴'}
.inv-sec > summary::-webkit-details-marker{display:none}
.inv-grid{padding:0 14px 14px}
.inv-grid--3{display:grid;grid-template-columns:1fr;gap:0}
.inv-f{display:flex;flex-direction:column;gap:5px;margin-bottom:11px}
.inv-f span{font-size:var(--t-legende);color:var(--ink-3)}
.inv-f input,.inv-f textarea{
  width:100%;min-height:42px;padding:10px 12px;border:1px solid var(--line-2);
  border-radius:10px;background:var(--surface-2);color:var(--ink);font-size:var(--t-second);
  font-family:inherit;resize:vertical;
}
.inv-lines-head{display:flex;align-items:center;justify-content:space-between;margin:2px 0 8px}
.inv-lines-head h3{margin:0;font-size:var(--t-second)}
.inv-row{display:grid;grid-template-columns:1fr 54px 78px 74px 30px;gap:6px;margin-bottom:7px}
.inv-row input,.inv-row select{
  min-height:42px;padding:0 9px;border:1px solid var(--line-2);border-radius:9px;
  background:var(--surface);color:var(--ink);font-size:var(--t-second);min-width:0;
}
.inv-row .inv-qte,.inv-row .inv-pu{text-align:right}
.inv-del{
  border-radius:9px;background:var(--surface-3);color:var(--ink-3);
  font-size:var(--t-titre);line-height:1;
}
.inv-tot{
  margin:14px 0 4px;padding:12px 14px;border-radius:var(--r-md);
  background:var(--surface-2);border:1px solid var(--line);
}
.inv-tot-l{display:flex;justify-content:space-between;font-size:var(--t-second);padding:3px 0;color:var(--ink-2)}
.inv-tot-l b{color:var(--ink);font-variant-numeric:tabular-nums}
.inv-tot-l--big{
  margin-top:6px;padding-top:9px;border-top:2px solid var(--accent);
  font-size:var(--t-corps);font-weight:700;color:var(--ink);
}
.inv-lettres{margin:8px 0 0;font-size:var(--t-legende);color:var(--ink-3);font-style:italic;line-height:1.45}
.inv-check{
  margin-top:14px;padding:12px 14px;border-radius:var(--r-md);
  font-size:var(--t-note);line-height:1.55;border:1px solid var(--line);background:var(--surface-2);
}
.inv-check ul{margin:6px 0 0;padding-left:18px}
.inv-check li{margin:2px 0}
.inv-check .inv-warn{color:var(--ink-3)}
.inv-check.is-ok{border-color:#1e8e3e55;background:#1e8e3e14}
.inv-check.is-bad{border-color:#d83a4155;background:#d83a410f}
.inv-check.is-warn{border-color:#c77a1255;background:#c77a120f}
/* lot 27 : le registre des factures, avoirs et devis */
.fac-actions{display:flex;flex-wrap:wrap;gap:8px;margin:2px 0 12px}
.fac-trous{margin:0 0 12px}
.fac-liste{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.fac-piece{display:flex;flex-direction:column;gap:3px;width:100%;text-align:left;padding:11px 13px;border-radius:var(--r-md);
  border:1px solid var(--line);background:var(--surface);color:var(--ink);font:inherit;min-height:44px}
.fac-piece:hover{background:var(--surface-2)}
.fac-piece__l1{display:flex;justify-content:space-between;gap:10px;font-size:var(--t-second)}
.fac-piece__ttc{font-variant-numeric:tabular-nums;font-weight:700}
.fac-piece__l2{font-size:var(--t-legende);color:var(--ink-3)}
/* le statut se LIT (le mot) ; la pastille de couleur ne fait que le souligner */
.fac-statut{color:var(--ink-2);font-weight:600;white-space:nowrap}
.fac-statut::before{content:'';display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--ink-3);margin:0 5px 1px 4px}
.fac-statut.is-ok::before{background:var(--ok)}
.fac-statut.is-attente::before{background:var(--warn)}
.fac-statut.is-retard::before{background:var(--danger)}
.fac-vide{padding:22px 6px;font-size:var(--t-second);line-height:1.6;color:var(--ink-2)}
.fac-detail{margin:0 0 10px;font-size:var(--t-second);line-height:1.6;color:var(--ink-2)}
.fac-ligne{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 2px;border-bottom:1px solid var(--line)}
.inv-intro{padding:6px 2px 10px;font-size:var(--t-second);line-height:1.6;color:var(--ink-2)}
.inv-intro p{margin:0 0 10px}
.inv-intro-note{font-size:var(--t-legende);color:var(--ink-3)}

/* ------------------------------ lecture a voix haute ------------------------------ */
.sp{display:flex;flex-direction:column;height:100%}
.sp-vide{padding:28px 20px;font-size:var(--t-second);line-height:1.6;color:var(--ink-2);text-align:center}
.sp-head{display:flex;gap:10px;align-items:center;padding:12px 16px 6px;flex-wrap:wrap}
.sp-head select{
  flex:1 1 150px;min-height:40px;padding:0 10px;border:1px solid var(--line-2);
  border-radius:10px;background:var(--surface);color:var(--ink);font-size:var(--t-second);
}
.sp-rate{display:flex;align-items:center;gap:8px;font-size:var(--t-legende);color:var(--ink-3)}
.sp-rate input{width:110px}
.sp-rate b{font-variant-numeric:tabular-nums;color:var(--ink-2);min-width:32px}
.sp-note{margin:0;padding:0 16px 6px;font-size:var(--t-legende);color:var(--ink-3)}
.sp-text{
  flex:1;overflow-y:auto;padding:10px 16px 16px;font-size:var(--t-corps);line-height:1.75;
  color:var(--ink-2);-webkit-overflow-scrolling:touch;
}
.sp-p{border-radius:5px;transition:background .18s}
.sp-p.is-now{background:var(--accent-soft);color:var(--ink);font-weight:600}
/* lot 26 : le mot en train d'être dit */
::highlight(sp-mot){background-color:color-mix(in srgb,var(--accent) 38%,transparent);color:var(--ink)}
.sp-bar{
  display:flex;align-items:center;justify-content:center;gap:16px;
  padding:10px 16px calc(10px + env(safe-area-inset-bottom));
  border-top:1px solid var(--line);background:var(--surface);
}
.sp-play{
  width:58px;height:58px;border-radius:50%;background:var(--accent);
  display:flex;align-items:center;justify-content:center;
}
.sp-play svg{width:26px;height:26px;fill:var(--accent-ink);stroke:none}
.sp-bar .icon-btn svg{fill:currentColor;stroke:none}
.sp-pos{
  position:absolute;right:18px;font-size:var(--t-legende);color:var(--ink-3);
  font-variant-numeric:tabular-nums;
}
.sp-bar{position:relative}

/* ------------------------------ Reconnaître le texte (lot 14) ------------------------------ */
.ocr-p{ margin:14px 16px 4px; font-size:var(--t-note); color:var(--ink-2); line-height:1.55 }
.ocr-note{ font-size:var(--t-legende); color:var(--ink-3) }
.ocr-h{ margin:20px 16px 8px; font-size:var(--t-legende); color:var(--ink-3);
        text-transform:uppercase; letter-spacing:.06em }
#ocr-l{ margin:0 16px }

/* ------------------------------ lot 15 : commenter ------------------------------ */
/* Lot 190 : tant que la pastille de reprise est là, « Commenter » se retire (elle passait dessous). */
.rd-puce:not([hidden]) ~ .rd-fab{display:none}
.rd-fab{
  position:absolute;right:14px;bottom:calc(92px + var(--safe-b));z-index:6;
  display:flex;align-items:center;gap:7px;
  padding:11px 16px 11px 13px;border:0;border-radius:999px;
  background:var(--accent);color:var(--accent-ink);font:inherit;font-size:var(--t-second);font-weight:650;
  box-shadow:0 6px 18px rgba(0,0,0,.22);
}
.rd-fab svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#view-reader.is-mode .rd-fab{display:none}
#view-reader.is-mode .rd-puce{bottom:calc(150px + var(--safe-b))}

.rpage__calque{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:3;overflow:visible}
.rpage__saisie{position:absolute;inset:0;z-index:4;cursor:crosshair}
.cm-suppr polygon{fill:rgba(216,58,65,.12);stroke:#D83A41;stroke-width:1.2;stroke-dasharray:4 3}
.cm-suppr line{stroke:#D83A41;stroke-width:1.2}

.cm__tete{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.cm__tete strong{font-size:var(--t-second)}
.cm__n{flex:1 1 auto;font-size:var(--t-legende);color:var(--ink-3)}
.cm__outils{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.cm__outils::-webkit-scrollbar{display:none}
.cm__o{
  flex:0 0 auto;border:1px solid var(--line);background:var(--surface-2);color:var(--ink);
  border-radius:999px;padding:7px 12px;font:inherit;font-size:var(--t-note);font-weight:560;
}
.cm__o.is-on{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.cm__coul{width:34px;padding:0;background:var(--c,#e8402a);border-color:rgba(0,0,0,.15)}
.cm__aide{margin:7px 2px 0;font-size:var(--t-legende);color:var(--ink-3);line-height:1.4}

.cm-couleurs{display:flex;gap:12px;flex-wrap:wrap;padding:4px 6px 8px}
.cm-couleur{width:44px;height:44px;border-radius:50%;border:2px solid rgba(0,0,0,.12)}
.cm-tampons{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:2px 6px 8px}
.cm-tampon{
  border:2.5px solid;border-radius:9px;background:var(--surface);padding:12px 6px;
  font:inherit;font-weight:800;letter-spacing:.04em;font-size:var(--t-second);
}
/* Lot 19 : la correction rapide (correction-rapide.js). */
.cm-tampon--plus{border-style:dashed;border-color:var(--line-2);color:var(--ink-2);font-weight:650;letter-spacing:0}
.cm__o--comp{border-color:#6d4aff;color:#6d4aff;font-weight:650}
.cm-banque__h{margin:12px 4px 6px;font-size:var(--t-legende);font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--ink-3)}
.cm-banque__h:first-child{margin-top:0}
.cm-banque__l{display:flex;align-items:center;gap:4px;margin:0 0 6px}
.cm-banque__p{flex:1;min-width:0;text-align:left;padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--ink);font:inherit;font-size:var(--t-second);line-height:1.35}
.cm-comp__l{display:flex;align-items:center;gap:8px;padding:8px 0;border-top:1px solid var(--line)}
.cm-comp__t{flex:1;min-width:0;font-size:var(--t-second);font-weight:600}
.cm-comp__n{display:flex;gap:4px}
.cm-comp__b{min-width:40px;height:36px;border-radius:10px;border:1px solid var(--line-2);background:var(--surface);color:var(--ink-2);font:inherit;font-size:var(--t-note);font-weight:700}
.cm-comp__b.is-on.cm-comp__b--1{background:#c62828;border-color:#c62828;color:#fff}
.cm-comp__b.is-on.cm-comp__b--2{background:#e8710a;border-color:#e8710a;color:#fff}
.cm-comp__b.is-on.cm-comp__b--3{background:#2a7de1;border-color:#2a7de1;color:#fff}
.cm-comp__b.is-on.cm-comp__b--4{background:#1e8e3e;border-color:#1e8e3e;color:#fff}
.cm-oral{text-align:center}
.cm-oral__chrono{font:700 34px/1.2 ui-monospace,Consolas,monospace;margin:4px 0 12px}
.cm-oral__b{display:flex;justify-content:center;gap:10px;margin-bottom:12px}
.cm-oral audio{width:100%;margin:0 0 6px}

.cm-liste{display:flex;flex-direction:column;gap:8px;margin:0 2px}
.cm-item{border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:var(--surface)}
.cm-item--rep{margin-left:18px;background:var(--surface-2)}
.cm-item.is-focus{border-color:var(--accent);box-shadow:0 0 0 1.5px var(--accent)}
.cm-item.is-suppr{opacity:.55}
.cm-item.is-suppr .cm-item__texte{text-decoration:line-through}
.cm-item__tete{font-size:var(--t-legende);font-weight:650;color:var(--ink-2)}
.cm-item__meta{font-size:var(--t-legende);color:var(--ink-3);margin-top:2px}
.cm-item__extrait{font-size:var(--t-note);color:var(--ink-2);font-style:italic;margin-top:5px}
.cm-item__texte{font-size:var(--t-second);margin-top:5px;white-space:pre-wrap;line-height:1.45}
.cm-item__actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}

/* ------------------------------ lot 15 : caviarder ------------------------------ */
.cv-zone{fill:rgba(216,58,65,.18);stroke:#D83A41;stroke-width:1.4;vector-effect:non-scaling-stroke}
.cv-zone--apercu{fill:rgba(216,58,65,.1);stroke-dasharray:5 4}
.inv-ok{color:#1E8E3E;font-weight:600}
.inv-ko{color:var(--danger);font-weight:600}

/* ------------------------------ lot 15 : créer un formulaire ------------------------------ */
.cf-tete{margin:12px 16px 8px;font-size:var(--t-note);color:var(--ink-2);line-height:1.5}
.cf-barre{padding:0 12px 10px}
.cf-calque{position:absolute;inset:0;touch-action:none;cursor:crosshair}
.cf-champ{
  position:absolute;box-sizing:border-box;border:1.5px solid #3B6EF6;border-radius:2px;
  background:rgba(59,110,246,.14);overflow:visible;touch-action:none;cursor:move;
}
.cf-champ span{
  position:absolute;left:0;bottom:100%;margin-bottom:1px;white-space:nowrap;
  font-size:var(--t-legende);line-height:1.2;padding:1px 4px;border-radius:3px;
  background:#3B6EF6;color:#fff;pointer-events:none;max-width:220px;overflow:hidden;text-overflow:ellipsis;
}
.cf-champ--existant{border-color:#8A8F99;background:rgba(138,143,153,.14);cursor:pointer}
.cf-champ--existant span{background:#8A8F99}
.cf-champ--existant.is-retire{border-color:#D83A41;background:rgba(216,58,65,.15)}
.cf-champ--existant.is-retire span{background:#D83A41}
.cf-champ--apercu{border-style:dashed;background:rgba(59,110,246,.08)}
.cf-poignee{
  position:absolute;right:-7px;bottom:-7px;width:14px;height:14px;border-radius:50%;
  background:#fff;border:2px solid #3B6EF6;cursor:nwse-resize;
}
.cf-props{display:flex;flex-direction:column;gap:10px;margin:0 6px}
.cf-prop{display:flex;flex-direction:column;gap:4px;font-size:var(--t-legende);color:var(--ink-3)}
.cf-prop input,.cf-prop textarea{
  font:inherit;font-size:var(--t-second);color:var(--ink);background:var(--surface);
  border:1px solid var(--line);border-radius:8px;padding:9px 10px;
}
.cf-prop textarea{min-height:80px;resize:vertical}

/* Cinq pastilles sur un téléphone : la pastille de couleur s'efface, le nom reste entier. */
@media (max-width: 420px){
  .mode-bar{gap:4px;padding-left:10px;padding-right:10px}
  .mode-chip{padding:0 6px;font-size:var(--t-note)}
  .mode-chip__dot{display:none}
}
.seal-code{font-size:var(--t-titre);letter-spacing:.08em;font-weight:700}

/* ==========================================================================
   Lot 38 — diapositives : graphiques, médias, pied du masque, entrées
   « Fondu » et « Vol », guides magnétiques, vue présentateur
   ========================================================================== */
.slgraph{width:100%;height:100%}
.slgraph svg{width:100%;height:100%;display:block}
.slmedia{width:100%;height:100%;object-fit:contain;background:#000;display:block}
.slmedia--audio{display:flex;align-items:center;background:transparent}
.slmedia--audio audio{width:100%}
.slmedia--vide{display:flex;align-items:center;justify-content:center;border:1px dashed currentColor;background:transparent;font-size:2.2cqw}
.slpied{position:absolute;left:4%;right:4%;bottom:2.2%;display:flex;justify-content:space-between;gap:2cqw;font-size:1.4cqw;opacity:.7;pointer-events:none}
.slguide{position:absolute;background:#E8402A;pointer-events:none;z-index:6}
.slguide--v{top:0;bottom:0;width:1px}
.slguide--h{left:0;right:0;height:1px}
.slobj.apparait--apparaitre{animation:none}
.slobj.apparait--fondu{animation:sl-fondu .5s ease}
.slobj.apparait--vol{animation:sl-vol .55s cubic-bezier(.2,.8,.3,1)}
@keyframes sl-vol{from{transform:translateY(100vh)}to{transform:none}}
@media (prefers-reduced-motion:reduce){.slobj.apparait--fondu,.slobj.apparait--vol{animation:none}}
.present__cote{display:none}
.present--vue .present__stage{gap:14px;padding:12px;align-items:flex-start}
.present--vue .present__scene{width:66%;max-width:none}
.present--vue .present__cote{display:flex;flex-direction:column;gap:10px;width:32%;color:#e8eaee;max-height:100%;overflow:auto}
.present__cote h3{margin:0;font-size:12.5px;letter-spacing:.04em;text-transform:uppercase;opacity:.7}
.present__mini{position:relative;container-type:size;width:100%;aspect-ratio:16/9;overflow:hidden;border-radius:6px;outline:1px solid rgba(255,255,255,.25)}
.present__cote .present__notes2{font-size:16px;line-height:1.6;white-space:pre-wrap}
.present__fin{display:flex;align-items:center;justify-content:center;height:100%;font-size:2cqw;opacity:.6}

/* ------------------------------ lot 41 : la boîte de réception ------------------------------ */
.recus-raccourci{
  display:flex;align-items:center;gap:10px;
  margin:4px 12px 2px;padding:10px 14px;min-height:48px;
  border-radius:var(--r-lg);background:var(--accent-soft);color:var(--ink);
  font-size:var(--t-second);font-weight:650;text-align:left;width:calc(100% - 24px);
}
.recus-raccourci[hidden]{display:none}
.recus-raccourci svg{width:22px;height:22px;flex:0 0 auto;stroke:var(--accent-texte);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.recus-raccourci__t{flex:1 1 auto}
.recus-raccourci__n{font-size:var(--t-note);font-weight:600;color:var(--ink-2)}
.recus{display:flex;flex-direction:column;gap:12px;margin:4px 12px 24px}
.recu{background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--shadow-sm);padding:4px 0 10px}
.recu__tete{display:flex;align-items:center;gap:12px;width:100%;padding:10px 14px 6px;text-align:left}
.recu__icone{flex:0 0 auto}
.recu__texte{flex:1 1 auto;min-width:0}
.recu__nom{display:block;font-size:var(--t-second);font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.recu__meta{display:block;margin-top:2px;font-size:var(--t-legende);color:var(--ink-2)}
.recu__infos{display:flex;flex-wrap:wrap;gap:6px;padding:2px 14px 8px}
.recu__echeance,.recu__etat{
  display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:0 10px;
  border-radius:999px;font-size:var(--t-legende);font-weight:600;background:var(--surface-2);color:var(--ink);
}
.recu__echeance::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--line-2)}
.recu__echeance.is-proche::before{background:var(--warn)}
.recu__echeance.is-urgent::before,.recu__echeance.is-retard::before{background:var(--danger)}
.recu__echeance.is-urgent,.recu__echeance.is-retard{font-weight:750}
.recu__etat{background:var(--accent-soft)}
/* Les trois actions : grandes, en bas de la carte, sous le pouce. */
.recu__actions{display:grid;grid-template-columns:1fr 1fr 1.3fr;gap:8px;padding:0 12px}
.recu__act{min-height:48px;padding:0 6px;font-size:var(--t-second)}
.recu__plus{display:flex;flex-wrap:wrap;gap:4px 8px;padding:8px 12px 0}
.recu__plus .btn{min-height:36px;font-size:var(--t-note)}
.recu-note{margin:8px 4px 0;font-size:var(--t-note);color:var(--ink-2)}
/* Dans le lecteur : le bandeau d'un fichier reçu, juste au-dessus des miniatures. */
.recu-bandeau{
  display:flex;align-items:center;gap:8px;padding:8px 10px;
  background:var(--surface);border-top:1px solid var(--line);
}
.recu-bandeau__de{flex:1 1 auto;min-width:0;font-size:var(--t-note);font-weight:600;color:var(--ink-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.recu-bandeau .btn{min-height:40px;flex:0 0 auto}
.is-mode .recu-bandeau{display:none}
/* Le bouton « Commenter » monte au-dessus du bandeau d'un fichier reçu. */
#view-reader.a-recu .rd-fab{bottom:calc(150px + var(--safe-b))}

/* ------------------------------ lot 43 : le tableur en fiches ------------------------------ */
.en-cartes .sg-wrap,.en-cartes .sg-bar{display:none}
.sg-cartes{flex:1 1 auto;min-height:0;overflow-y:auto;padding:8px 12px 20px;background:var(--surface-2)}
.sg-cartes[hidden]{display:none}
.sg-cartes__nav{display:flex;align-items:center;gap:8px;margin:0 0 8px}
.sg-cartes__nav .icon-btn{font-size:26px;line-height:1;width:48px;height:48px;border-radius:12px;background:var(--surface);border:1px solid var(--line-2)}
.sg-cartes__nav .icon-btn:disabled{opacity:.4}
.sg-cartes__pos{flex:1;text-align:center;font-size:14px;font-weight:600;color:var(--ink-2)}
.sg-carte{background:var(--surface);border-radius:var(--r-lg);box-shadow:var(--shadow-sm);padding:14px 14px 6px}
.sg-carte__qui{margin:0 0 12px;font-size:var(--t-titre);font-weight:700;line-height:1.25;overflow-wrap:anywhere}
.sg-champ{display:block;margin:0 0 14px}
.sg-champ__l{display:block;margin:0 0 5px;font-size:var(--t-note);font-weight:650;color:var(--ink-2)}
.sg-champ .sg-champ__in{display:block;box-sizing:border-box;width:100%;height:50px;min-height:50px;padding:0 14px;border:1px solid var(--line-2);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit;font-size:var(--t-titre)}
.sg-champ__in:focus{outline:2px solid var(--accent);outline-offset:1px}
.sg-champ__in[aria-invalid="true"]{border-color:var(--danger)}
.sg-champ__calc{display:block;min-height:44px;padding:10px 14px;border-radius:12px;background:var(--surface-2);font-size:var(--t-titre);font-weight:650}
.sg-choix{display:flex;flex-wrap:wrap;gap:8px}
.sg-choix__b{min-height:48px;padding:0 16px;border-radius:12px;border:1px solid var(--line-2);background:var(--surface);color:var(--ink);font:inherit;font-size:var(--t-second);font-weight:600}
.sg-choix__b[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.sg-cartes__bas{display:flex;gap:10px;margin-top:12px}
.sg-cartes__bas .btn{flex:1;min-height:48px}

/* Lot 102 : les tableaux structurés (en-tête, lignes alternées, total) et les sparklines. */
.cell--tab-tete{font-weight:700;background:color-mix(in srgb,var(--accent) 16%,var(--surface));border-bottom-color:color-mix(in srgb,var(--accent) 55%,var(--line))}
.cell--tab-bande{background:color-mix(in srgb,var(--accent) 6%,var(--surface))}
.cell--tab-pied{font-weight:700;border-top:2px solid color-mix(in srgb,var(--accent) 55%,var(--line))}
.cell--spark{padding:3px 5px}
.sg-spark{position:absolute;inset:4px 6px;width:calc(100% - 12px);height:calc(100% - 8px);color:var(--accent);overflow:visible;pointer-events:none}
.sg-spark polyline{fill:none;stroke:currentColor;stroke-width:1.6;vector-effect:non-scaling-stroke;stroke-linejoin:round;stroke-linecap:round}
.sg-spark circle{fill:currentColor}
.sg-spark rect{fill:currentColor}
.sg-spark rect.neg{fill:var(--danger)}

/* Lot 104 : le rapport d'accessibilité d'un PDF reçu. */
.a11y-verdict{margin:0 0 10px;font-size:var(--t-second);font-weight:650;line-height:1.45}
.a11y-verdict.is-ok{color:#1E8E3E}
.a11y-liste{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:8px}
.a11y-liste li{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);line-height:1.45;font-size:var(--t-second)}
.a11y-liste li.is-ko{border-color:color-mix(in srgb,var(--danger) 45%,var(--line))}
.a11y-pastille{flex:0 0 auto;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:var(--t-note);background:var(--surface-2);color:var(--ink-3)}
.is-ok .a11y-pastille{background:#1E8E3E;color:#fff}
.is-ko .a11y-pastille{background:var(--danger);color:#fff}
.a11y-aide{display:block;color:var(--ink-3);font-size:var(--t-note);margin-top:2px}

/* Lot 104 : mesurer sur un plan. */
.mesure{display:flex;flex-direction:column;gap:10px;padding:12px}
.mesure__page{position:relative;align-self:center;max-width:100%;touch-action:none;border:1px solid var(--line);background:#fff}
.mesure__page canvas{display:block;width:100%;height:auto}
.mesure__page svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.mesure__page polyline,.mesure__page polygon{fill:none;stroke:#d81e19;stroke-width:3;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.mesure__page polygon.ms-fait{fill:rgba(216,30,25,.14)}
.mesure__page .ms-encours{stroke-dasharray:6 4}
.mesure__page circle{fill:#d81e19}
.mesure__pied{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end}
.mesure__liste{margin:0;padding-left:20px;line-height:1.7;font-size:var(--t-second)}
.bt-pieces{margin:6px 0 0;padding-left:20px;line-height:1.7;font-size:var(--t-second)}

/* Lot 103 : le pointeur laser (au doigt), et l'autre écran branché. */
.present__laser{position:absolute;width:2.4%;aspect-ratio:1;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none;z-index:5;
  background:radial-gradient(circle,#ff3b30 0 35%,rgba(255,59,48,.45) 36% 60%,transparent 61%)}
.present--laser .present__scene{cursor:none;touch-action:none}
.present__nb[aria-pressed="true"]{background:#fff;color:#000;border-color:#fff}
