/* Écran d'accueil artboard — QR & Barcode Studio */

.preview-panel:has(.qr-welcome) {
  grid-template-rows: 64px 1fr;
}

.preview-panel .qr-welcome {
  grid-row: 2 / -1;
  width: 100%;
  align-self: stretch;
}

.qr-welcome {
  --ink: #11110f;
  --paper: #f3f0e8;
  --acid: #d9ff32;
  --orange: #ff6038;

  position: relative;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  overflow: hidden;
  border-radius: 12px;
  background-color: var(--paper);
  background-image:
    linear-gradient(#11110f0e 1px, transparent 1px),
    linear-gradient(90deg, #11110f0e 1px, transparent 1px);
  background-size: 22px 22px;
  font-family: "Arial Narrow", "Helvetica Neue Condensed", Arial, sans-serif;
  color: var(--ink);
}

.qr-welcome * {
  box-sizing: border-box;
}

.qr-welcome-lbl {
  position: absolute;
  top: 10px;
  left: 11px;
  z-index: 6;
  display: flex;
  gap: 5px;
}

.qr-welcome-lbl span,
.qr-welcome-lbl b {
  border: 1.5px solid var(--ink);
  padding: 4px 7px;
  font: 700 9px/1 "Courier New", monospace;
  letter-spacing: 0.08em;
  background: #fff;
}

.qr-welcome-lbl b {
  background: var(--acid);
}

.qr-welcome-scene {
  position: relative;
  padding: 20px;
  flex: none;
}

.qr-welcome-frame {
  position: absolute;
  inset: 0;
  z-index: 4;
  animation: qz-frame 6.6s ease-in-out infinite;
}

.qr-welcome-br {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 4px solid var(--orange);
}

.qr-welcome-br.tl {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
}

.qr-welcome-br.tr {
  top: 0;
  right: 0;
  border-left: 0;
  border-bottom: 0;
}

.qr-welcome-br.bl {
  bottom: 0;
  left: 0;
  border-right: 0;
  border-top: 0;
}

.qr-welcome-br.brr {
  bottom: 0;
  right: 0;
  border-left: 0;
  border-top: 0;
}

@keyframes qz-frame {
  0%, 24%   { opacity: 0.2; transform: scale(1.07); }
  32%, 90%  { opacity: 1; transform: scale(1); }
  100%      { opacity: 0.2; transform: scale(1.07); }
}

.qr-welcome-grid {
  display: grid;
  grid-template-columns: repeat(21, 1fr);
  width: 180px;
  height: 180px;
  padding: 8px;
  background: #fff;
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}

.qr-welcome-grid i {
  display: block;
  background: transparent;
}

.qr-welcome-grid i.on {
  background: var(--ink);
  transform: scale(0);
  animation: qz-pop 6.6s ease-out infinite;
}

@keyframes qz-pop {
  0%       { transform: scale(0); }
  10%, 86% { transform: scale(1); }
  96%, 100% { transform: scale(0); }
}

.qr-welcome-grid i.fp {
  animation: qz-pop 6.6s ease-out infinite, qz-lock 6.6s ease-in-out infinite;
}

@keyframes qz-lock {
  0%, 56%   { background: var(--ink); }
  62%, 84%  { background: var(--orange); }
  92%, 100% { background: var(--ink); }
}

.qr-welcome-beam {
  position: absolute;
  left: 20px;
  right: 20px;
  height: 4px;
  background: var(--orange);
  box-shadow: 0 0 15px 3px #ff603899;
  z-index: 5;
  opacity: 0;
  animation: qz-beam 6.6s ease-in-out infinite;
}

@keyframes qz-beam {
  0%, 26%   { top: 22px; opacity: 0; }
  31%       { opacity: 1; }
  60%       { top: 194px; opacity: 1; }
  66%, 100% { top: 194px; opacity: 0; }
}

.qr-welcome-decoded {
  position: absolute;
  left: 50%;
  bottom: -19px;
  z-index: 7;
  border: 2px solid var(--ink);
  background: var(--acid);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 7px 10px;
  font: 700 8px/1 "Courier New", monospace;
  white-space: nowrap;
  opacity: 0;
  animation: qz-decoded 6.6s ease-out infinite;
}

@keyframes qz-decoded {
  0%, 58%   { opacity: 0; transform: translateX(-50%) translateY(7px); }
  68%, 86%  { opacity: 1; transform: translateX(-50%) translateY(0); }
  94%, 100% { opacity: 0; transform: translateX(-50%) translateY(7px); }
}

.qr-welcome .mm-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  z-index: 6;
  padding: 0 16px;
}

.qr-welcome .mm-foot h2 {
  margin: 0;
  font-size: 27px;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.055em;
}

.qr-welcome .mm-foot p {
  margin: 0;
  max-width: 400px;
  text-align: center;
  font: 400 12px/1.55 "Courier New", monospace;
}

.qr-welcome .mm-start {
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--acid);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  min-height: 44px;
  padding: 0 18px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}

.qr-welcome .mm-start:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--ink);
}

.qr-welcome .mm-start:active {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.qr-welcome .mm-start span {
  margin-left: 14px;
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .qr-welcome * {
    animation: none !important;
  }

  .qr-welcome-grid i.on {
    transform: scale(1);
  }

  .qr-welcome-beam {
    opacity: 0;
  }

  .qr-welcome-decoded {
    opacity: 1;
    transform: translateX(-50%);
  }
}
