/*
 * lp-scene.css — dessin d'une scène du Studio (fond + calques), commun à l'éditeur et à la page
 * de rendu du serveur. Toutes les mesures sont en px de l'image finale (1080×1080, 1920×1080…) :
 * l'éditeur affiche la scène réduite par un transform: scale(), le rendu la capture à 100 %.
 */
@font-face {
  font-family: 'Talina';
  src: url('assets/Talina.otf') format('opentype');
  font-weight: 400 900;
  font-display: block;
}

.lps-stage {
  position: relative; overflow: hidden;
  background: #05070d;
  transform-origin: 0 0;
  isolation: isolate;
}
.lps-stage, .lps-stage * { box-sizing: border-box; }

/* Fond : couches empilées sous les calques. */
.lps-fond { position: absolute; inset: 0; pointer-events: none; }
.lps-fond-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lps-fond-voile { position: absolute; inset: 0; background: #05070d; }
.lps-fond-grille { position: absolute; inset: 0; }

.lps-calque {
  position: absolute; left: 0; top: 0;
  transform-origin: 50% 50%;
}
.lps-calque.is-masque { display: none !important; }

/* Texte */
.lps-texte {
  white-space: pre-wrap; overflow-wrap: break-word;
  margin: 0; padding: 0;
  font-kerning: normal;
}
.lps-texte .lps-txt { display: block; }
.lps-texte.is-degrade .lps-txt {
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.lps-texte .lps-txt { paint-order: stroke fill; }
.lps-texte[contenteditable], .lps-texte .lps-txt[contenteditable] { outline: none; cursor: text; }

/* Image */
.lps-image { overflow: hidden; }
.lps-image img { width: 100%; height: 100%; display: block; }
.lps-image.is-vide {
  background: repeating-linear-gradient(45deg, rgba(140,152,184,.18) 0 12px, rgba(140,152,184,.08) 12px 24px);
  border: 2px dashed rgba(140,152,184,.5);
}

/* Encadré « coins en flèche » de lanppart.fr (même dessin que .hud-corner / lp-reveal). */
.lps-encadre { overflow: visible; }
.lps-encadre-panel { position: absolute; inset: 0; }
.lps-encadre-c { position: absolute; pointer-events: none; }
.lps-encadre-c.tl { left: 0; top: 0; border-top-style: solid; border-left-style: solid; }
.lps-encadre-c.tr { right: 0; top: 0; border-top-style: solid; border-right-style: solid; }
.lps-encadre-c.bl { left: 0; bottom: 0; border-bottom-style: solid; border-left-style: solid; }
.lps-encadre-c.br { right: 0; bottom: 0; border-bottom-style: solid; border-right-style: solid; }

/* Formes */
.lps-forme { overflow: visible; }

/* À l'export, un cadre d'image vide ne laisse aucune trace (les rayures ne servent qu'à l'éditeur). */
.lps-stage.is-export .lps-image.is-vide { background: none; border: 0; }

/* QR code */
.lps-qr.is-vide {
  background: repeating-linear-gradient(45deg, rgba(140,152,184,.18) 0 12px, rgba(140,152,184,.08) 12px 24px);
  border: 2px dashed rgba(140,152,184,.5);
}
.lps-stage.is-export .lps-qr.is-vide { background: none; border: 0; }
