.scanner-main {
  width: 100%;
  flex: 1;
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 16px 32px;
  gap: 20px;
}

.aide-panel {
  width: 100%;
  max-width: 700px;
}

.scanner-panel {
  width: 100%;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scan-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}

.scan-buttons button {
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background-color: #658ced;
  color: white;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s, transform 0.1s;
}

.scan-buttons button:hover {
  background-color: #4a6cb5;
  transform: translateY(-1px);
}

#scan-canvas {
  display: block;
  margin: 16px auto;
  background: #222;
  max-width: 280px;
  width: 100%;
  border-radius: 8px;
}

.matrix-container {
  width: 100%;
  margin-top: 6px;
}

.matrix-container h3 {
  margin-bottom: 4px;
}

.matrix-output {
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 10px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.8rem;
  max-height: 260px;
  overflow-y: auto;
  white-space: pre;
}

.matrix-raw {
  display: none;
}

#result {
  display: none;
}

@media (max-width: 700px) {
  .scanner-main {
    padding: 16px 12px 24px;
  }

  #scan-canvas {
    max-width: 240px;
  }
}

.camera-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  z-index: 9999;
}

#camera-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transform-origin: center center;
}

#scan-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60%;
  max-width: 400px;
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border: 3px solid #00ff4c;
  border-radius: 8px;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  z-index: 1;
}

.camera-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 2;
  pointer-events: auto;
}

.camera-shutter {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  background-color: #658ced;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s, transform 0.1s;
  z-index: 2;
}

.camera-shutter:hover {
  background-color: #4a6cb5;
  transform: translate(-50%, -1px);
}

.camera-zoom {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  max-width: 400px;
  z-index: 2;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

.camera-zoom::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
}

.camera-zoom::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
}

.bloc-cartes h2 {
  margin: 0;
}

@media (max-width: 700px) {
  #camera-preview {
    width: 100%;
    height: 100%;
  }
}

.aide-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.refresh-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 10px;
}

.refresh-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.refresh-icon {
  width: 22px;
  height: 22px;
  display: block;
  filter: brightness(0) invert(1);
}

.paliers {
  list-style: none;
  padding: 0;
  margin: 0;
}

.paliers li {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.25;
  margin: 6px 0;
}

.palier-requis {
  font-family: monospace;
  font-weight: 700;
  margin: 0;
}

.palier-indice {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.85;
  font-style: italic;
}

.palier-reveal {
  margin: 0;
  font-size: 0.9rem;
  color: #ffdfa6;
  font-style: italic;
  display: inline;
  white-space: nowrap;
}

.palier-ok {
  color: #9cff9c;
  font-weight: 700;
}

#manu{
    display: none;
}
