/* =========================================================
   LIGHT PAINTING ROOM — by Seventh Room
   Feuille autonome : tout est sous body.lpr et préfixé lpr-.
   Aucune règle ne touche le reste du site.
   CSS simple (pas de grid obligatoire) pour les vieux iPad.
   ========================================================= */
body.lpr { margin: 0; background: #07070d; color: #f2f0ff; font-family: "Segoe UI", -apple-system, Roboto, Arial, sans-serif; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
.lpr * { box-sizing: border-box; }
.lpr a { color: #7fe7ff; }
.lpr-page { max-width: 1100px; margin: 0 auto; padding: 16px 16px 60px; }
.lpr-top { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-align: center; -webkit-align-items: center; align-items: center; -webkit-box-pack: justify; -webkit-justify-content: space-between; justify-content: space-between; gap: 10px; padding: 6px 0 14px; }
.lpr-top a { text-decoration: none; font-weight: 700; }
.lpr-logo { font-weight: 900; letter-spacing: 3px; font-size: 15px; text-transform: uppercase; }
.lpr-logo b { background: -webkit-linear-gradient(left, #ff3fd2, #00e5ff); background: linear-gradient(90deg, #ff3fd2, #ffe600, #29ff5a, #00e5ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lpr-logo small { display: block; font-size: 10px; letter-spacing: 2px; color: #9d98c4; font-weight: 600; }
.lpr h1 { font-size: 34px; line-height: 1.05; margin: 8px 0 8px; letter-spacing: -0.5px; }
.lpr h2 { font-size: 21px; margin: 26px 0 10px; }
.lpr p { line-height: 1.55; }
.lpr-lead { color: #c9c5e8; font-size: 17px; max-width: 46em; }
.lpr-cards { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; margin: 0 -8px; }
.lpr-card { display: block; width: 100%; margin: 8px; padding: 18px; border-radius: 18px; background: #13131f; border: 2px solid #2a2840; color: #f2f0ff !important; text-decoration: none; cursor: pointer; text-align: left; font: inherit; }
@media (min-width: 640px) { .lpr-card { width: -webkit-calc(50% - 16px); width: calc(50% - 16px); } }
@media (min-width: 980px) { .lpr-card { width: -webkit-calc(33.33% - 16px); width: calc(33.33% - 16px); } }
.lpr-card:hover, .lpr-card:focus { border-color: #00e5ff; }
.lpr-card strong { display: block; font-size: 18px; margin: 6px 0 4px; }
.lpr-card span { color: #b9b4dc; font-size: 14px; line-height: 1.45; display: block; }
.lpr-card .lpr-emoji { font-size: 30px; color: inherit; }
.lpr-card.off { opacity: 0.45; }
.lpr-tag { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 999px; background: #1f1d33; color: #ffe600 !important; font-size: 12px !important; font-weight: 700; }
.lpr-btn { display: inline-block; min-height: 46px; padding: 11px 16px; margin: 4px; border-radius: 14px; border: 2px solid #00e5ff; background: #00e5ff; color: #04040a !important; font: 800 15px "Segoe UI", -apple-system, Arial, sans-serif; text-decoration: none; cursor: pointer; -ms-touch-action: manipulation; touch-action: manipulation; vertical-align: middle; }
.lpr-btn.alt { background: transparent; color: #e9e6ff !important; border-color: #3b3858; }
.lpr-btn.on { background: #ff3fd2; border-color: #ff3fd2; color: #fff !important; }
.lpr-btn.rouge { background: #ff2a55; border-color: #ff2a55; color: #fff !important; }
.lpr-btn.gros { min-height: 60px; font-size: 19px; padding: 14px 24px; }
.lpr-btn:disabled { opacity: 0.4; cursor: default; }
.lpr-row { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; -webkit-box-align: center; -webkit-align-items: center; align-items: center; margin: 6px 0; }
.lpr-chip { min-height: 40px; padding: 8px 12px; margin: 3px; border-radius: 999px; border: 2px solid #3b3858; background: #13131f; color: #e9e6ff; font: 700 14px inherit; cursor: pointer; }
.lpr-chip.on { border-color: #ffe600; color: #ffe600; }
.lpr-swatch { width: 38px; height: 38px; margin: 3px; border-radius: 50%; border: 3px solid #13131f; cursor: pointer; box-shadow: 0 0 10px rgba(255,255,255,.18); }
.lpr-swatch.on { border-color: #fff; box-shadow: 0 0 16px currentColor; }
.lpr-pick { width: 44px; height: 40px; border: 0; background: none; padding: 0; margin: 3px; }
.lpr-slider { display: inline-block; margin: 4px 12px 4px 0; font-size: 13px; color: #b9b4dc; min-width: 150px; }
.lpr-slider span { display: block; margin-bottom: 2px; }
.lpr-slider input { width: 160px; }
.lpr-msg { min-height: 1.4em; color: #9ff7b6; margin: 8px 0; }
.lpr-msg.bad { color: #ffb3c2; }
.lpr-box { background: #13131f; border: 1px solid #2a2840; border-radius: 16px; padding: 14px 16px; margin: 12px 0; }
.lpr-box.warn { border-color: #ffb020; background: #2a1f08; }
.lpr-box.bad { border-color: #ff2a55; background: #2a0b14; }
.lpr-box.good { border-color: #29ff5a; background: #0b2414; }
.lpr-small { font-size: 13px; color: #9d98c4; }
.lpr-hide { display: none !important; }

/* ---------- Dessin lumineux ---------- */
.lpr-draw-stage { position: relative; background: #000; border-radius: 14px; overflow: hidden; text-align: center; }
.lpr-draw-view { display: block; margin: 0 auto; background: #000; cursor: crosshair; -ms-touch-action: none; touch-action: none; }
.lpr-badge-num { position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.6); color: #ffe600; font-size: 12px; font-weight: 700; pointer-events: none; }
.lpr-draw-timer { display: none; position: absolute; right: 12px; top: 10px; padding: 6px 14px; border-radius: 12px; background: rgba(255,63,210,.85); font-size: 26px; font-weight: 900; pointer-events: none; }

/* ---------- Studio ---------- */
.lpr-stage { position: relative; background: #000; border-radius: 16px; overflow: hidden; }
.lpr-stage canvas { display: block; width: 100%; height: auto; }
.lpr-stage video { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.lpr-hud { position: absolute; left: 10px; top: 10px; right: 10px; display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-pack: justify; -webkit-justify-content: space-between; justify-content: space-between; pointer-events: none; font-weight: 800; }
.lpr-hud span { background: rgba(0,0,0,.6); padding: 5px 10px; border-radius: 10px; font-size: 13px; }
.lpr-big { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-size: 72px; font-weight: 900; text-shadow: 0 0 24px #ff3fd2; pointer-events: none; }
.lpr-big small { display: block; font-size: 20px; text-shadow: none; }
.lpr-big.haut { top: 6%; font-size: 58px; }
#durees .lpr-chip { min-width: 74px; font-size: 17px; }
.lpr-rec { color: #ff2a55; }
.lpr-modal { position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: rgba(0,0,0,.78); z-index: 50; padding: 16px; overflow: auto; }
.lpr-modal > div { max-width: 560px; margin: 8vh auto 0; background: #15142a; border: 2px solid #ff3fd2; border-radius: 20px; padding: 20px; }
.lpr-thumbs { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; }
.lpr-thumb { width: 150px; margin: 5px; background: #13131f; border: 1px solid #2a2840; border-radius: 12px; padding: 6px; font-size: 12px; color: #b9b4dc; }
.lpr-thumb img { display: block; width: 100%; border-radius: 8px; }
.lpr-thumb b { color: #f2f0ff; }
.lpr-ok { color: #29ff5a; } .lpr-wait { color: #ffe600; } .lpr-ko { color: #ff6b8a; }
.lpr-ellipse { position: absolute; border: 3px dashed #ffe600; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 9999px rgba(0,0,0,.25); }
.lpr-excl { position: absolute; border: 2px solid #ff2a55; background: rgba(255,42,85,.25); pointer-events: none; }
.lpr-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lpr-table td, .lpr-table th { border-bottom: 1px solid #2a2840; padding: 7px 6px; text-align: left; vertical-align: top; }
.lpr-code { font: 900 54px/1 "Consolas", monospace; letter-spacing: 8px; color: #ffe600; }
.lpr-remote .lpr-btn { width: 46%; min-height: 70px; font-size: 20px; }
.lpr-preview { display: block; width: 100%; max-width: 640px; background: #000; border-radius: 12px; min-height: 120px; }

/* =========================================================
   STUDIO v3 (17/10/2026) — commandes toujours visibles
   Tout est sous body.lpr-studio : aucune autre page touchée.
   ========================================================= */
.lpr-studio { padding-bottom: 104px; padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
.lpr-studio .lpr-page-studio { max-width: 1400px; padding-left: 12px; padding-right: 12px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
.lpr-studio .lpr-top { padding-bottom: 6px; }
.lpr-studio .lpr-modes .lpr-chip { min-height: 44px; font-size: 15px; }
.lpr-studio .lpr-chip, .lpr-studio .lpr-btn { min-height: 44px; }
.lpr-studio .lpr-btn.petit { min-height: 44px; padding: 9px 12px; font-size: 14px; }
.lpr-work { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
.lpr-main { min-width: 0; }
.lpr-side .lpr-box { margin: 8px 0; padding: 10px 12px; }
.lpr-field { display: block; margin: 6px 0; font-size: 13px; color: #b9b4dc; }
.lpr-field span { display: block; margin-bottom: 3px; }
.lpr-field input[type=range], .lpr-field select { width: 100%; }
.lpr-field select { min-height: 44px; font-size: 15px; border-radius: 10px; background: #1b1a2e; color: #f2f0ff; border: 1px solid #3b3858; padding: 0 8px; }
.lpr-check { display: inline-block; margin: 6px 12px 6px 0; font-size: 14px; min-height: 30px; }
@media (min-width: 1000px) {
  .lpr-work { -webkit-flex-direction: row; flex-direction: row; -webkit-align-items: flex-start; align-items: flex-start; }
  .lpr-main { -webkit-flex: 1; flex: 1; }
  .lpr-side { width: 340px; margin-left: 14px; max-height: calc(100vh - 210px); overflow: auto; }
}
/* scène : la vidéo garde ses proportions, sa hauteur dépend de la taille choisie */
#stage { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-justify-content: center; justify-content: center; -webkit-align-items: center; align-items: center; min-height: 160px; }
#stage canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 52vh; }
#stage[data-taille="compact"] canvas { max-height: 32vh; }
#stage[data-taille="grand"] canvas { max-height: 72vh; }
@media (max-width: 700px) {
  #stage canvas { max-height: 42vh; }
  #stage[data-taille="compact"] canvas { max-height: 26vh; }
  #stage[data-taille="grand"] canvas { max-height: 58vh; }
}
@media (max-height: 500px) {               /* téléphone en paysage */
  #stage canvas { max-height: 50vh; }
  #stage[data-taille="compact"] canvas { max-height: 34vh; }
  #stage[data-taille="grand"] canvas { max-height: 62vh; }
  .lpr-studio .lpr-top { display: none; }
}
.lpr-stage-cta { position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); z-index: 3; }
.lpr-warn { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 8px 12px; border-radius: 12px; background: rgba(42, 31, 8, .92); border: 1px solid #ffb020; color: #ffe1a0; font-size: 14px; z-index: 2; }
.lpr-big.cd { top: 30%; font-size: 120px; }
.lpr-big.cd.go { color: #29ff5a; text-shadow: 0 0 30px #29ff5a; }
/* barre fixe en bas */
.lpr-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(12, 11, 24, .96); border-top: 1px solid #2a2840; padding: 8px 10px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
.lpr-bar-in { max-width: 1400px; margin: 0 auto; display: -webkit-box; display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center; gap: 6px 12px; }
.lpr-bar-group { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-flex-wrap: wrap; flex-wrap: wrap; }
.lpr-bar-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: #9d98c4; margin-right: 6px; }
.lpr-bar .lpr-chip { min-width: 62px; min-height: 46px; font-size: 16px; margin: 2px; }
.lpr-bar .lpr-chip:disabled { opacity: .45; }
.lpr-chrono { min-width: 84px; text-align: center; font: 900 28px/1 "Consolas", "Segoe UI", monospace; color: #ffe600; }
.lpr-start { min-width: 190px; background: #8b5cf6; border-color: #8b5cf6; color: #fff !important; }
.lpr-bar .lpr-btn { margin: 2px; }
@media (max-width: 520px) {
  .lpr-bar-label { display: none; }
  .lpr-bar .lpr-chip { min-width: 50px; font-size: 15px; padding: 6px 6px; margin: 2px 1px; }
  .lpr-bar-in { gap: 4px 8px; }
  .lpr-chrono { min-width: 60px; font-size: 22px; }
  .lpr-start { min-width: 150px; }
}
@media (max-height: 500px) {               /* téléphone en paysage : tout remonte */
  #mode-aide { display: none; }
  .lpr-studio .lpr-modes .lpr-chip { min-height: 40px; padding: 6px 10px; font-size: 13px; }
  .lpr-bar { padding-top: 4px; padding-bottom: calc(4px + env(safe-area-inset-bottom)); }
  .lpr-studio { padding-bottom: 76px; }
  /* une seule ligne de commandes pour garder de la place à l'aperçu */
  .lpr-bar-label { display: none; }
  .lpr-bar .lpr-chip { min-width: 50px; min-height: 44px; font-size: 15px; padding: 6px 6px; margin: 2px 1px; }
  .lpr-chrono { min-width: 58px; font-size: 22px; }
  .lpr-start { min-width: 140px; }
}
/* 17/10 : rappel sous la barre (comme la maquette) — masqué quand la place manque */
.lpr-bar-note { margin: 2px 0 0; text-align: center; font-size: 11.5px; color: #8f8ab5; letter-spacing: .3px; }
@media (max-width: 520px), (max-height: 500px) { .lpr-bar-note { display: none; } }

/* 17/10 — calibrage guidé */
.lpr-calib { position: fixed; top: 10px; right: 10px; z-index: 45; width: 340px; max-width: calc(100vw - 20px); max-height: calc(100vh - 130px); overflow: auto; background: rgba(18,17,34,.96); border: 1px solid #3b3858; border-radius: 16px; padding: 12px 14px; color: #f2f0ff; box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.lpr-calbar { height: 6px; background: #2a2840; border-radius: 6px; margin: 8px 0; overflow: hidden; }
.lpr-calbar i { display: block; height: 100%; width: 0; background: #39ff88; }
.lpr-small.ok { color: #7dffb0; } .lpr-small.bad { color: #ffb4b4; }
