@font-face {
  font-family: "DSEG7 Classic";
  src: url("assets/fonts/DSEG7Classic-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DSEG14 Classic";
  src: url("assets/fonts/DSEG14Classic-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #121d33;
  --navy: #26324b;
  --navy-deep: #111a2e;
  --wall-blue: #7da3d7;
  --panel: rgba(20, 31, 52, 0.82);
  --panel-strong: rgba(13, 22, 39, 0.96);
  --text: #ffffff;
  --muted: #c8d8ee;
  --gold: #f5a623;
  --red: #c40008;
  --green: #2fbf6e;
  --orange: #f5a623;
  --teal: #7da3d7;
  --blue: #7da3d7;
  --light-blue: #9fc2ef;
  --line: rgba(255, 255, 255, 0.16);
  --shadow: 0 22px 70px rgba(3, 8, 18, 0.44);

  /* Palette de la fiche technique */
  --navy-night: #07142f;
  --navy-deep-2: #0d1c38;
  --navy-card-end: #08142b;
  --accent-blue: #1176ff;
  --card-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);

  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

.screen,
.public-site {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, transparent 30%, rgba(7, 20, 47, 0.55) 78%, rgba(7, 20, 47, 0.92)),
    linear-gradient(180deg, rgba(7, 15, 30, 0.24), rgba(7, 15, 30, 0.62) 58%, rgba(6, 13, 26, 0.9)),
    url("assets/site-background.png") center / cover no-repeat scroll;
}

.public-site {
  display: block;
}

@media (min-width: 1280px) {
  .public-site {
    padding: 5vh 5vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot,
  .total-card.amount-flash,
  .amount.amount-pop {
    animation: none;
  }
}

.public-hero,
.prices-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.public-hero {
  min-height: auto;
  padding: clamp(12px, 2vw, 22px) 0 clamp(6px, 1.4vw, 12px);
  display: grid;
  align-content: start;
  gap: 0;
}

.prices-section {
  padding: clamp(8px, 2vw, 18px) 0 clamp(26px, 5vw, 52px);
}

.wall-decor {
  position: absolute;
  pointer-events: none;
  z-index: 1;
  display: none;
}

.wall-decor-right {
  width: min(46vw, 560px);
  height: min(58vw, 700px);
  right: max(-180px, -12vw);
  top: 20px;
  opacity: 0.78;
}

.wall-ball {
  position: absolute;
  width: clamp(160px, 24vw, 300px);
  aspect-ratio: 1;
  border: clamp(16px, 2vw, 26px) solid rgba(125, 163, 215, 0.36);
  border-radius: 50%;
  color: rgba(125, 163, 215, 0.5);
  display: grid;
  place-items: center;
  font-size: clamp(3.8rem, 10vw, 8rem);
  font-weight: 1000;
  line-height: 1;
  transform: rotate(-12deg);
}

.wall-ball::before,
.wall-ball::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(125, 163, 215, 0.34);
}

.wall-ball::before {
  width: 42%;
  height: 9%;
  top: 12%;
  right: 10%;
  transform: rotate(18deg);
}

.wall-ball::after {
  width: 54%;
  height: 8%;
  bottom: 14%;
  left: 9%;
  transform: rotate(18deg);
}

.wall-ball-one {
  top: 4%;
  right: 8%;
}

.wall-ball-two {
  top: 32%;
  right: 34%;
}

.wall-ball-three {
  bottom: 2%;
  right: 0;
}

.brand-row,
.public-topbar,
.panel-header,
.settings-row,
.switch-row,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  width: 100%;
}

.logo-mark {
  width: clamp(205px, 25vw, 320px);
  min-height: clamp(102px, 13vw, 152px);
  flex: 0 0 auto;
  border-radius: 0;
  background: transparent;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.36)) drop-shadow(0 0 22px rgba(17, 118, 255, 0.28));
  overflow: hidden;
  display: grid;
  place-items: center;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-mark span {
  display: none;
  color: white;
  font-size: clamp(1.6rem, 4vw, 2.75rem);
  font-weight: 1000;
  line-height: 0.85;
  text-align: center;
  text-shadow:
    0 0 0 #25324d,
    0 0 14px rgba(125, 163, 215, 0.62);
}

.logo-mark small {
  color: var(--gold);
  font-size: 0.32em;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: clamp(1.05rem, 1.55vw, 1.45rem);
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.site-title {
  display: grid;
  align-content: center;
  min-width: 0;
  flex: 1 1 0%;
  gap: clamp(2px, 0.6vw, 6px);
}

.title-eyebrow {
  margin: 0;
  color: var(--text);
  font-size: clamp(0.85rem, 1.3vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.82;
}

.title-heading {
  margin: 0;
  color: var(--gold);
  font-size: clamp(1.6rem, 3vw, 3rem);
  font-weight: 1000;
  line-height: 1.05;
  text-wrap: balance;
}

.sr-only {
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  position: absolute;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 17ch;
  color: white;
  font-size: clamp(2rem, 4.35vw, 4.15rem);
  font-weight: 1000;
  line-height: 0.94;
  text-wrap: balance;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.24),
    0 0 28px rgba(125, 163, 215, 0.28);
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.5rem);
}

.live-status {
  min-height: 38px;
  padding: 9px 16px;
  border: 1px solid rgba(125, 163, 215, 0.42);
  border-radius: 999px;
  background: rgba(9, 17, 31, 0.66);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: white;
  font-weight: 800;
  font-size: 0.92rem;
  justify-content: center;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.live-status-row {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.live-status--normal {
  border-color: rgba(47, 191, 110, 0.5);
}

.live-status--normal .live-dot {
  background: var(--green);
  box-shadow: 0 0 14px rgba(47, 191, 110, 0.75);
  animation: live-pulse 2.2s ease-in-out infinite;
}

.live-status--updating,
.live-status--stale {
  border-color: rgba(245, 166, 35, 0.5);
  color: var(--muted);
}

.live-status--updating .live-dot,
.live-status--stale .live-dot {
  background: var(--orange);
  box-shadow: 0 0 12px rgba(245, 166, 35, 0.6);
}

.live-status--offline {
  border-color: rgba(196, 0, 8, 0.45);
  color: var(--muted);
}

.live-status--offline .live-dot {
  background: var(--red);
  box-shadow: 0 0 12px rgba(196, 0, 8, 0.55);
}

@keyframes live-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.75);
    opacity: 0.55;
  }
}

.bingo-balls-art {
  width: min(520px, 72vw);
  max-height: 210px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.38));
  opacity: 0.96;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 18px;
  align-items: stretch;
}

.featured {
  min-height: 238px;
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid rgba(125, 163, 215, 0.34);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 12%, rgba(245, 169, 0, 0.22), transparent 32%),
    linear-gradient(135deg, rgba(125, 163, 215, 0.14), rgba(255, 255, 255, 0.035)),
    rgba(9, 17, 31, 0.58);
  box-shadow: var(--shadow);
  display: grid;
  align-content: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.featured::after {
  content: "";
  position: absolute;
  width: 180px;
  aspect-ratio: 1;
  right: -52px;
  bottom: -78px;
  border: 18px solid rgba(125, 163, 215, 0.14);
  border-radius: 50%;
}

.featured-name {
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.7rem);
  font-weight: 900;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.featured-amount {
  color: var(--gold);
  font-size: clamp(3.8rem, 9.2vw, 8.7rem);
  font-weight: 1000;
  line-height: 0.9;
  text-shadow: 0 0 34px rgba(255, 207, 103, 0.32);
  position: relative;
  z-index: 1;
}

.public-info {
  display: grid;
  gap: 14px;
}

.public-info > div {
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(125, 163, 215, 0.25);
  border-radius: 8px;
  background: rgba(9, 17, 31, 0.58);
  box-shadow: var(--shadow);
  display: grid;
  align-content: center;
  gap: 8px;
}

.info-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
}

.info-value {
  color: white;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  font-weight: 1000;
}

.totals-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: clamp(16px, 2vw, 24px);
  align-items: stretch;
}

/* Fiche technique section 9 : deux cartes cote a cote seulement a partir de 900px */
@media (max-width: 899px) {
  .totals-grid {
    grid-template-columns: 1fr;
  }
}

.total-card {
  min-height: clamp(190px, 20vw, 270px);
  padding: clamp(22px, 2.6vw, 34px);
  border: 1px solid rgba(125, 163, 215, 0.65);
  border-radius: 22px;
  background: linear-gradient(165deg, var(--navy-deep-2), var(--navy-card-end));
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  justify-items: center;
  gap: clamp(10px, 1.4vw, 16px);
  container-type: inline-size;
}

.total-card--blue {
  border-color: rgba(17, 118, 255, 0.65);
}

.total-card--blue::before {
  background: radial-gradient(circle, rgba(17, 118, 255, 0.32), transparent 70%);
}

.total-card--gold {
  border-color: rgba(245, 166, 35, 0.65);
}

.total-card--gold::before {
  background: radial-gradient(circle, rgba(245, 166, 35, 0.28), transparent 70%);
}

.total-card::before {
  content: "";
  position: absolute;
  inset: -30%;
  z-index: 0;
  pointer-events: none;
}

.total-card-title {
  align-self: start;
  margin-top: 0;
  color: var(--gold);
  font-size: clamp(1.4rem, 2.4vw, 2.4rem);
  font-weight: 1000;
  line-height: 1;
  text-transform: uppercase;
  text-align: center;
  position: relative;
  z-index: 1;
}

.total-card.amount-flash {
  animation: amount-flash 350ms ease-out;
}

.total-card-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  align-self: center;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  max-width: 100%;
  font-size: clamp(64px, 6cqw, 112px);
}

.amount {
  color: white;
  font-family: "Orbitron", "DSEG14 Classic", "DSEG7 Classic", monospace;
  font-weight: 700;
  font-size: 1em;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.025em;
  line-height: 1;
  white-space: nowrap;
}

.currency {
  font-family: "Montserrat", Inter, sans-serif;
  font-size: 0.4em;
  font-weight: 800;
  margin-left: 0.35em;
  color: var(--gold);
}

.amount.amount-pop {
  animation: amount-pop 350ms ease-out;
}

@keyframes amount-flash {
  0% {
    box-shadow: var(--card-shadow);
  }
  40% {
    box-shadow: var(--card-shadow), 0 0 32px rgba(245, 166, 35, 0.45);
  }
  100% {
    box-shadow: var(--card-shadow);
  }
}

@keyframes amount-pop {
  0% {
    text-shadow: none;
  }
  40% {
    text-shadow: 0 0 18px rgba(245, 166, 35, 0.65);
  }
  100% {
    text-shadow: none;
  }
}

@supports not (font-size: 6cqw) {
  .amount {
    font-size: clamp(52px, 5.2vw, 100px);
  }
}

.ticker {
  min-height: 48px;
  margin-top: 18px;
  overflow: hidden;
  border-top: 1px solid rgba(125, 163, 215, 0.28);
  border-bottom: 1px solid rgba(125, 163, 215, 0.28);
  background: rgba(9, 17, 31, 0.52);
  display: flex;
  align-items: center;
}

.ticker span {
  display: inline-block;
  min-width: 100%;
  white-space: nowrap;
  color: white;
  font-size: clamp(1.2rem, 2.5vw, 2.2rem);
  font-weight: 900;
  animation: ticker 18s linear infinite;
}

.site-note {
  margin-top: 12px;
  color: rgba(200, 216, 238, 0.82);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.legal-warning {
  margin-top: 8px;
  color: rgba(200, 216, 238, 0.5);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}

@keyframes ticker {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}

.control-panel {
  min-height: 100vh;
  padding: 24px;
  background: var(--panel);
  border-left: 1px solid var(--line);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.control-panel.hidden {
  display: none;
}

.open-panel {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 10;
  display: none;
  width: 116px;
}

.open-panel.visible {
  display: inline-flex;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--teal);
}

a {
  color: inherit;
}

button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  cursor: pointer;
  font-weight: 900;
}

button:hover {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.18);
}

.icon-button {
  width: 42px;
  padding: 0;
  font-size: 1.45rem;
}

.switch {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
}

.switch input {
  width: 20px;
  min-height: 20px;
}

.totals-editor {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}

.editor-row {
  display: grid;
  grid-template-columns: 1fr 116px 42px;
  gap: 8px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.delete-button {
  width: 42px;
  padding: 0;
  color: var(--red);
}

.add-button {
  background: linear-gradient(135deg, rgba(255, 79, 95, 0.72), rgba(79, 140, 255, 0.72));
}

.control-link {
  min-height: 42px;
  border: 1px solid rgba(56, 213, 196, 0.42);
  border-radius: 6px;
  padding: 10px 14px;
  background: rgba(56, 213, 196, 0.12);
  color: white;
  text-align: center;
  text-decoration: none;
  font-weight: 900;
}

.capture-page {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(5, 7, 12, 0.92), rgba(5, 7, 12, 0.72)),
    url("assets/bingo-background.png") center / cover no-repeat fixed;
}

.capture-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
}

.capture-main {
  padding: 24px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
}

.capture-toolbar,
.capture-side {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.capture-toolbar {
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: 12px;
}

.video-stage {
  min-height: 360px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #020305;
  box-shadow: var(--shadow);
}

.video-stage video,
.video-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-stage canvas {
  cursor: crosshair;
}

.empty-video {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.capture-side {
  min-height: 100vh;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.zone-list {
  display: grid;
  gap: 10px;
  overflow-y: auto;
}

.zone-row {
  display: grid;
  grid-template-columns: 1fr 116px 42px;
  gap: 8px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.zone-status {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.publish-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.publish-status {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.reader-badge {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.4;
}

.reader-badge.reader-fallback {
  color: var(--gold);
  border-color: var(--gold);
}

.status-good {
  color: var(--teal);
}

.status-warn {
  color: var(--gold);
}

.side-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.08);
}

.danger-button {
  color: var(--red);
}

.panel-hidden .screen {
  grid-template-columns: 1fr;
}

@media (max-width: 980px) {
  .screen {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .wall-decor-right {
    right: -210px;
    opacity: 0.46;
  }

  .control-panel {
    min-height: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .capture-shell {
    grid-template-columns: 1fr;
  }

  .capture-side {
    min-height: auto;
  }

  .capture-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .screen,
  .public-site {
    background:
      linear-gradient(180deg, rgba(7, 15, 30, 0.18), rgba(7, 15, 30, 0.62) 54%, rgba(6, 13, 26, 0.93)),
      url("assets/site-background-mobile.png") center / cover no-repeat scroll,
      radial-gradient(circle at 50% 8%, rgba(125, 163, 215, 0.18), transparent 32%),
      #071426;
  }

  /* Fiche technique section 9 : le plancher 64px (pense TV) coupe les montants
     sur un mobile etroit - on redescend le plancher pour qu'il n'y ait jamais
     de coupure. Cible total-card-amount (pas .amount) pour que .currency,
     qui se dimensionne en em par rapport a ce meme parent, suive la taille. */
  .total-card-amount {
    font-size: clamp(28px, 13cqw, 100px);
  }

  .brand-row,
  .public-topbar,
  .section-heading,
  .settings-row,
  .switch-row {
    align-items: stretch;
    flex-direction: column;
  }

  .live-status {
    justify-content: center;
  }

  .brand-lockup {
    align-items: center;
    flex-direction: column;
    text-align: center;
  }

  .site-title {
    justify-items: center;
    width: 100%;
    text-align: center;
  }

  .logo-mark {
    width: min(340px, 100%);
    min-height: 118px;
  }

  h1 {
    max-width: 12ch;
    margin: 0 auto;
    font-size: clamp(1.95rem, 9vw, 2.65rem);
    line-height: 0.96;
    text-align: center;
  }

  .bingo-balls-art {
    width: 100%;
    max-height: 146px;
    object-position: center;
  }

  .editor-row {
    grid-template-columns: 1fr;
  }

  .delete-button {
    width: 100%;
  }

  .zone-row {
    grid-template-columns: 1fr;
  }
}
