/* Lecture : QR code, photo d'identité, sous-titres, texte d'une image. */
.lec-cache { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.lec-centre { justify-content: center; }
.lec-alerte { padding: 11px 14px; border-radius: 12px; background: #fff6e0; box-shadow: inset 0 0 0 1px rgba(196, 136, 0, .28); font-size: 14px; line-height: 1.5; color: #6b4a00; }

/* Résultat d'un QR code */
.lec-res { display: grid; gap: 10px; padding: 18px; border-radius: 18px; background: var(--soft); }
.lec-titre { font-size: 14px; font-weight: 600; color: var(--muted); }
.lec-domaine { font: 700 clamp(22px, 5vw, 30px)/1.2 var(--head); letter-spacing: -.02em; color: var(--ink); overflow-wrap: anywhere; }
.lec-brut { font-size: 14px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.lec-texte { padding: 14px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--line); font-size: 16px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.lec-ligne { display: grid; gap: 2px; padding: 11px 14px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.lec-ligne small { font-size: 13px; color: var(--muted); }
.lec-val { font: 600 17px/1.35 var(--head); color: var(--ink); overflow-wrap: anywhere; user-select: all; }
a.lec-val { color: var(--red-deep); text-decoration: underline; user-select: auto; }

/* Caméra */
.lec-cam { display: grid; gap: 10px; justify-items: center; }
.lec-cam-vue { position: relative; width: 100%; max-width: 460px; border-radius: 18px; overflow: hidden; background: #0b0b10; aspect-ratio: 4 / 3; }
.lec-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lec-viseur { position: absolute; inset: 14% 22%; border: 3px solid #fff; border-radius: 16px; box-shadow: 0 0 0 999px rgba(11, 11, 16, .32); pointer-events: none; }

/* Photo d'identité */
.pid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 20px; align-items: start; }
.pid-vue { display: grid; gap: 8px; }
.pid-geste { text-align: center; }
.pid-scene { position: relative; aspect-ratio: 35 / 45; border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 18px 30px -20px rgba(12, 12, 24, .5); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.pid-scene:active { cursor: grabbing; }
.pid-scene:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.pid-canvas { display: block; width: 100%; height: 100%; }
.pid-gabarit { position: absolute; inset: 0; pointer-events: none; }
.pid-gabarit svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pid-gabarit line, .pid-gabarit ellipse { vector-effect: non-scaling-stroke; fill: none; }
.pid-bande { fill: rgba(22, 163, 74, .28); }
.pid-trait { stroke: #15803d; stroke-width: 2; }
.pid-ovale-fond { stroke: rgba(0, 0, 0, .45); stroke-width: 4; }
.pid-ovale { stroke: #fff; stroke-width: 2; stroke-dasharray: 7 6; }
.pid-rep { position: absolute; left: 6px; margin-top: 3px; padding: 1px 7px; border-radius: 7px; background: #15803d; font-size: 13px; font-weight: 600; line-height: 1.5; color: #fff; }
.pid-rep-bas { margin-top: 4px; }
.pid-cote { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-content: start; min-width: 0; }
.pid-cote .btn { white-space: normal; height: auto; min-height: 52px; padding-top: 8px; padding-bottom: 8px; }
.pid-consigne { padding: 12px 14px; border-radius: 12px; background: #e9f8ef; font-size: 15px; line-height: 1.5; color: #0a5c33; }
.pid-avis { margin-top: 2px; }

/* Sous-titres */
.lec-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; min-height: 250px; white-space: pre; overflow: auto; }
.lec-decal { display: grid; grid-template-columns: auto auto minmax(70px, 1fr) auto auto; gap: 6px; align-items: center; }
.lec-decal .inp { text-align: center; }
.lec-decal .btn { height: 46px; padding: 0 12px; white-space: nowrap; }

/* Image en texte */
.lec-ocr, .lec-ocr-res { display: grid; gap: 12px; }
.lec-ocr-haut { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 14px; align-items: center; }
.lec-vignette { width: 130px; height: 96px; object-fit: cover; border-radius: 12px; background: var(--soft); box-shadow: 0 0 0 1px var(--line); }
.lec-avance { display: grid; gap: 8px; font-size: 14px; color: var(--text); }
.lec-barre { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.lec-barre i { display: block; width: 0; height: 100%; border-radius: 99px; background: var(--red); transition: width .25s; }
.lec-ocr-res .area { min-height: 240px; }

@media (max-width: 700px) {
  .pid { grid-template-columns: minmax(0, 1fr); }
  .pid-vue { width: 100%; max-width: 300px; margin: 0 auto; }
  .lec-zones { grid-template-columns: minmax(0, 1fr); }
  .lec-mono { min-height: 180px; }
  .lec-decal { grid-template-columns: 1fr 1fr 1fr 1fr; }
  .lec-decal .inp { grid-column: 1 / -1; grid-row: 1; }
  .lec-ocr-haut { grid-template-columns: 96px minmax(0, 1fr); }
  .lec-vignette { width: 96px; height: 76px; }
}
