@font-face {
  font-family: 'EdoSZ';
  src: url('/assets/fonts/EdoSZ.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Arial-Black';
  src: url('/assets/fonts/Arial-Black.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Arial-BoldMT';
  src: url('/assets/fonts/Arial-BoldMT.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'ArialNarrow';
  src: url('/assets/fonts/ArialNarrow.ttf') format('truetype');
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  min-height: 100dvh;
  background: #F7F4EE;
  background: var(--bg, #F7F4EE);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body.game-body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100%;
  min-height: 100dvh;
  background: #F7F4EE;
  background: var(--bg, #F7F4EE);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  appearance: none;
  cursor: pointer;
}

/* Conteneur ratio strict 1080×1920 — unité via container queries */
.stage {
  position: relative;
  width: min(100vw, calc(100dvh * var(--design-w) / var(--design-h)));
  aspect-ratio: var(--design-w) / var(--design-h);
  height: auto;
  container-type: size;
  container-name: stage;
  overflow: hidden;
  background: var(--bg);
  flex-shrink: 0;
}

.stage-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.ov {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.ov-btn {
  border: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-ui);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2.4cqw;
  box-shadow: 0 0.55cqw 1.2cqw rgba(0, 0, 0, 0.28);
}

.ov-btn.is-pending,
.ov-btn[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 1;
  filter: none;
}

.ov-btn:active:not(.is-pending):not([aria-disabled='true']) {
  filter: brightness(0.95);
}

.ov-question {
  font-family: var(--font-body);
  overflow: visible;
  padding: 2.2cqw 2.8cqw;
  align-items: center;
  justify-content: center;
}

.ov-question p {
  margin: 0;
  width: 100%;
  max-width: 100%;
  font-size: 2.9cqw;
  line-height: 1.28;
  font-weight: 600;
  text-align: center;
  hyphens: none;
  -webkit-hyphens: none;
  -ms-hyphens: none;
  word-break: normal;
  overflow-wrap: normal;
}

.ov-answer {
  display: flex;
  align-items: center;
  gap: 2.2cqw;
  padding: 0 2.4cqw 0 1.4cqw;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 800;
  color: #1a1a1a;
  background: #F4EDDE;
  border: 0.18cqw solid #5C5750;
  box-shadow: 0 0.55cqw 1.1cqw rgba(40, 35, 30, 0.28);
}

.ov-answer input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ov-answer__letter {
  flex: 0 0 auto;
  width: 5.8cqw;
  height: 5.8cqw;
  border-radius: 50%;
  background: #F4EDDE;
  color: #B41622;
  border: 0.32cqw solid #B41622;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.7cqw;
  font-weight: 800;
  box-sizing: border-box;
}

.ov-answer__text {
  flex: 1;
  text-align: center;
  font-size: max(3cqw, 16px);
  font-weight: 800;
  color: #1a1a1a;
  padding-right: 1.5cqw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ov-answer.is-selected {
  box-shadow: 0 0.65cqw 1.3cqw rgba(40, 35, 30, 0.34);
}

.ov-answer.is-selected .ov-answer__letter {
  background: #B41622;
  color: #fff;
  border-color: #B41622;
}

/* Admin */
.admin-body {
  background: #f3f1ec;
  color: #222;
  font-family: Georgia, 'Times New Roman', serif;
  display: block;
  min-height: 100vh;
}
.admin-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.admin-nav a,
.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background: #b41622;
  color: #fff;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 14px;
}
.admin-nav a.secondary,
.admin-btn.secondary {
  background: #333;
}
.admin-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 18px;
}
.admin-card h1,
.admin-card h2 {
  margin-top: 0;
  font-family: Arial Black, Arial, sans-serif;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  font-size: 13px;
}
.admin-table th,
.admin-table td {
  border-bottom: 1px solid #eee;
  padding: 8px;
  text-align: left;
  vertical-align: top;
}
.admin-table th {
  background: #faf7f2;
}
.warn {
  color: #9a121c;
  font-weight: 700;
}
.ok {
  color: #1b7a3a;
}
.preview-frame {
  width: 390px;
  height: 844px;
  border: 1px solid #ccc;
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  margin: 12px 0;
}
.preview-frame iframe {
  width: 1080px;
  height: 1920px;
  transform: scale(0.361);
  transform-origin: top left;
  border: 0;
}
.form-grid {
  display: grid;
  gap: 10px;
}
.form-grid label {
  display: grid;
  gap: 4px;
  font-family: Arial, sans-serif;
  font-size: 13px;
}
.form-grid input,
.form-grid textarea,
.form-grid select {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: Arial, sans-serif;
}
.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.qr-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 12px;
}
.qr-item img {
  width: 100%;
  height: auto;
}
.error-list {
  color: #9a121c;
  font-family: Arial, sans-serif;
}
.overlay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
