/* =========================================================================
   Poule Poule — feuille de style
   Mobile d'abord, portrait comme paysage.
   ========================================================================= */

:root {
  --bg: #0b0d10;
  --bg-2: #14171d;
  --felt: #12151b;
  --felt-deep: #07080a;
  --nitrate: #0e1014;
  --cream: #fbf5e6;
  --cream-soft: #ebdcc0;
  --paper: #fcf7ec;
  --paper-2: #f2e9d9;
  --ink: #1b1713;
  --ink-soft: #54493b;
  --muted: #b7a893;
  --gold: #f4cb72;
  --gold-deep: #c49332;
  --gold-soft: #ffeaab;
  --cinema-gold: #f4cb72;
  --cinema-gold-deep: #be8e2c;
  --cinema-gold-beam: #ffeaab;
  --cinema-red: #8f1f1d;
  --cinema-red-bright: #c0392b;
  --tomato: #e75f3c;
  --tomato-deep: #b84126;
  --green: #43a977;
  --green-deep: #1f7250;
  --red: #d9513f;
  --red-deep: #a33224;
  --white-line: rgba(255, 235, 185, 0.16);
  --shadow-card: 0 24px 50px rgba(0, 0, 0, 0.65), 0 4px 12px rgba(0, 0, 0, 0.45);
  --display: "Broadway", "Playfair Display", "Cinzel", "Century", "Georgia", "Arial Rounded MT Bold", system-ui, sans-serif;
  --display-cinema: "Broadway", "Cinzel", "Playfair Display", "Century", "Georgia", serif;
  --body: "Century", "Georgia", "Segoe UI", system-ui, -apple-system, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body.screen-game {
  overflow: hidden;
  background: var(--felt-deep);
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

/* Les styles d'auteur (display: grid/flex) ne doivent pas casser le
   repli natif des <details>. */
details:not([open]) > :not(summary) {
  display: none !important;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  display: inline-block;
  vertical-align: -0.14em;
}

/* ----------------------------- Ambiance ---------------------------------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(244, 203, 114, 0.18), transparent 52%),
    radial-gradient(circle at 10% 20%, rgba(143, 31, 29, 0.22), transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(196, 147, 50, 0.14), transparent 48%),
    linear-gradient(170deg, #13151b 0%, #0c0e12 45%, #060709 100%);
}

.ambient-projector-ray {
  position: absolute;
  top: -10vh;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  height: 120vh;
  background: conic-gradient(from 180deg at 50% 0%, transparent 68deg, rgba(255, 234, 171, 0.04) 85deg, rgba(255, 234, 171, 0.07) 90deg, rgba(255, 234, 171, 0.04) 95deg, transparent 112deg);
  pointer-events: none;
  animation: projectorFlicker 9s ease-in-out infinite alternate;
}

@keyframes projectorFlicker {
  0%, 100% { opacity: 0.8; }
  32% { opacity: 0.95; }
  48% { opacity: 0.72; }
  76% { opacity: 1; }
}

.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
}

.ambient-glow-a {
  width: 55vw;
  height: 55vw;
  left: -20vw;
  top: 16vh;
  background: rgba(143, 31, 29, 0.24);
  animation: drift 16s ease-in-out infinite alternate;
}

.ambient-glow-b {
  width: 65vw;
  height: 65vw;
  right: -26vw;
  bottom: -8vh;
  background: rgba(196, 147, 50, 0.22);
  animation: drift 20s ease-in-out infinite alternate-reverse;
}

.ambient-grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4vw, -5vh, 0) scale(1.12); }
}

/* ------------------------------- Menu ------------------------------------ */

.menu {
  position: relative;
  width: min(100%, 860px);
  margin: 0 auto;
  padding: calc(20px + var(--safe-top)) max(18px, var(--safe-left)) calc(30px + var(--safe-bottom));
}

.hero {
  text-align: center;
  padding: 10px 0 30px;
}

.tiny-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(244, 203, 114, 0.38);
  background: rgba(244, 203, 114, 0.09);
  color: var(--gold-soft);
  font-family: var(--display-cinema);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.logo-postcard {
  position: relative;
  width: min(100%, 540px);
  padding: 28px 24px 24px;
  border-radius: 20px;
  border: 2px solid rgba(244, 203, 114, 0.55);
  background:
    radial-gradient(circle at 50% 0%, rgba(244, 203, 114, 0.18), transparent 64%),
    linear-gradient(170deg, #1c1d24, #121318 60%, #0d0e12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 240, 200, 0.25);
}

.logo-postcard::before,
.logo-postcard::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: rgba(244, 203, 114, 0.85);
  border-style: solid;
  pointer-events: none;
}

.logo-postcard::before {
  top: 8px;
  left: 8px;
  border-width: 2px 0 0 2px;
}

.logo-postcard::after {
  right: 8px;
  bottom: 8px;
  border-width: 0 2px 2px 0;
}

.logo-kicker {
  font-family: var(--display-cinema);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cinema-gold);
  margin-bottom: 10px;
}

.logo {
  margin: 0;
  font-family: var(--display-cinema);
  font-size: clamp(52px, 14vw, 98px);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 4px 0 #5f3e0c, 0 10px 30px rgba(0, 0, 0, 0.7);
  transform: none;
}

.logo span {
  display: block;
}

.logo span:first-child {
  color: var(--cream);
  letter-spacing: 0.05em;
}

.logo .logo-poule {
  color: var(--cinema-gold);
  text-shadow: 0 4px 0 #6e460d, 0 12px 36px rgba(244, 203, 114, 0.35);
}

.marquee-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 12px 0 4px;
  color: var(--cinema-gold);
}

.marquee-divider span {
  flex: 1;
  max-width: 90px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 203, 114, 0.6), transparent);
}

.marquee-divider i {
  font-style: normal;
  font-size: 13px;
}

.logo-sub {
  margin: 6px 0 0;
  font-family: var(--body);
  font-size: 13.5px;
  color: var(--cream-soft);
  letter-spacing: 0.06em;
}
  color: var(--muted);
  letter-spacing: 0.04em;
}

.hero-pitch {
  max-width: 520px;
  margin: 0 auto 24px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--cream-soft);
}

.hero-pitch strong {
  color: var(--gold);
  font-size: 1.1em;
}

/* Boutons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 13px 20px;
  border: 0;
  border-radius: 15px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn .icon {
  width: 19px;
  height: 19px;
}

.btn-primary {
  background: linear-gradient(180deg, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
  color: #3b2503;
  box-shadow: 0 12px 24px rgba(245, 182, 65, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn-primary:hover {
  filter: brightness(1.04);
}

.btn-light {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid rgba(27, 42, 36, 0.14);
  box-shadow: 0 5px 14px rgba(27, 42, 36, 0.08);
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(248, 241, 224, 0.3);
}

.btn-ghost:hover {
  background: rgba(248, 241, 224, 0.08);
}

.btn-quiet {
  background: transparent;
  color: var(--ink-soft);
  min-height: 44px;
  font-weight: 700;
}

.btn-hero {
  width: min(100%, 430px);
  min-height: 74px;
  justify-content: flex-start;
  gap: 15px;
  padding: 14px 22px;
  text-align: left;
  border-radius: 19px;
}

.btn-hero .icon-play {
  width: 26px;
  height: 26px;
}

.btn-hero-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.btn-hero-title {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.btn-hero-meta {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.7;
  margin-top: 2px;
}

/* Réglages */

.settings {
  display: grid;
  gap: 14px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 2px 0;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  white-space: nowrap;
}

.section-line {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, rgba(245, 182, 65, 0.28), transparent);
}

.panel {
  border: 1px solid var(--white-line);
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(255, 250, 236, 0.065), rgba(255, 250, 236, 0.022));
  padding: 18px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.055);
}

.panel-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 900;
  color: var(--cream);
  letter-spacing: -0.015em;
}

.panel-hint {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(245, 182, 65, 0.13);
  border: 1px solid rgba(245, 182, 65, 0.24);
  color: var(--gold-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.panel-note {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.preset-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.preset-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-height: 66px;
  padding: 10px 11px;
  border-radius: 13px;
  border: 1px solid rgba(248, 241, 224, 0.16);
  background: rgba(255, 255, 255, 0.035);
  color: var(--cream);
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}

.preset-chip:hover {
  background: rgba(255, 255, 255, 0.07);
}

.preset-chip:active {
  transform: scale(0.985);
}

.preset-chip-label {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.preset-chip-count {
  font-size: 10.5px;
  color: var(--muted);
}

.preset-chip.is-selected {
  border-color: var(--gold);
  background: linear-gradient(160deg, rgba(245, 182, 65, 0.22), rgba(245, 182, 65, 0.07));
  box-shadow: inset 0 0 0 1px rgba(245, 182, 65, 0.18), 0 8px 18px rgba(0, 0, 0, 0.14);
}

.preset-chip.is-selected .preset-chip-count {
  color: var(--gold-soft);
}

.preset-chip.is-selected::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(245, 182, 65, 0.2);
}

.deck-editor {
  margin-top: 14px;
  border-top: 1px solid rgba(248, 241, 224, 0.1);
  padding-top: 4px;
}

.deck-editor summary,
.panel-rules summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 800;
  color: var(--cream-soft);
  cursor: pointer;
  list-style: none;
}

.deck-editor summary::-webkit-details-marker,
.panel-rules summary::-webkit-details-marker {
  display: none;
}

.deck-editor summary::after,
.panel-rules summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(248, 241, 224, 0.1);
  font-size: 15px;
  font-weight: 700;
  color: var(--cream-soft);
  transition: transform 0.2s ease;
}

.deck-editor[open] summary::after,
.panel-rules[open] summary::after {
  transform: rotate(45deg);
}

.summary-hint {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.deck-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 8px 0 4px;
}

.deck-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 6px 7px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.045);
}

.deck-thumb {
  width: 24px;
  height: 37px;
  flex: 0 0 auto;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
  background: var(--paper-2);
}

.deck-name {
  min-width: 0;
  flex: 1;
  font-size: 10.5px;
  line-height: 1.15;
  color: var(--cream-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 2px;
}

.stepper button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--cream);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.stepper button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.stepper button:disabled {
  opacity: 0.28;
  cursor: default;
}

.stepper-count {
  min-width: 18px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
}

.deck-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.deck-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px 3px 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.deck-chip img {
  width: 15px;
  height: 23px;
  object-fit: cover;
  border-radius: 2px;
}

.deck-chip strong {
  color: var(--cream-soft);
  font-size: 10.5px;
}

/* Segmented et switches */

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.055);
}

.seg-btn {
  min-height: 42px;
  padding: 8px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.seg-btn.is-selected {
  background: linear-gradient(180deg, rgba(248, 241, 224, 0.18), rgba(248, 241, 224, 0.08));
  color: var(--cream);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.toggle-list {
  display: grid;
  gap: 2px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  cursor: pointer;
  border-bottom: 1px solid rgba(248, 241, 224, 0.075);
}

.toggle-row:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.toggle-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.toggle-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--cream);
}

.toggle-desc {
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
}

.switch-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--cream-soft);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1.2);
}

.switch-input:checked + .switch {
  background: var(--gold);
  border-color: var(--gold-soft);
}

.switch-input:checked + .switch::after {
  transform: translateX(18px);
  background: #3b2503;
}

.switch-input:focus-visible + .switch {
  outline: 3px solid rgba(245, 182, 65, 0.45);
  outline-offset: 2px;
}

.panel-rules {
  padding-top: 10px;
  padding-bottom: 10px;
}

.rules-list {
  margin: 4px 0 6px;
  padding: 0 0 0 18px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

.rules-list strong {
  color: var(--cream-soft);
}

.menu-footer {
  margin-top: 30px;
  text-align: center;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(183, 200, 186, 0.7);
}

.reset-link {
  justify-self: center;
  margin: 4px 0 0;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(183, 200, 186, 0.6);
  font-size: 11px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.reset-link:hover {
  color: var(--cream-soft);
}

.menu-footer p {
  margin: 3px 0;
}

/* ------------------------------- Jeu ------------------------------------- */

.game {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  background:
    radial-gradient(ellipse at 50% 36%, rgba(54, 132, 100, 0.26), transparent 58%),
    radial-gradient(ellipse at 50% 105%, rgba(0, 0, 0, 0.45), transparent 62%),
    linear-gradient(180deg, #0b2b25, #071c18 78%);
  overflow: hidden;
}

.game-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px 6px;
  flex: 0 0 auto;
}

.round-icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid rgba(248, 241, 224, 0.16);
  background: rgba(255, 255, 255, 0.045);
  color: var(--cream-soft);
  cursor: pointer;
  transition: background 0.18s ease, transform 0.15s ease;
}

.round-icon-btn:active {
  transform: scale(0.94);
}

.round-icon-btn:hover {
  background: rgba(255, 255, 255, 0.09);
}

.round-icon-btn .icon {
  width: 20px;
  height: 20px;
}

.game-bar-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  line-height: 1.25;
}

.game-round {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--cream);
}

.game-objective {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

.game-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.deck-left {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 7px;
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(248, 241, 224, 0.1);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 900;
  color: var(--cream-soft);
  font-variant-numeric: tabular-nums;
}

.deck-left::after {
  content: "cartes";
  display: block;
  font-family: var(--body);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: -3px;
}

.table {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 4px 12px 0;
}

.table-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 2px 0 4px;
  color: rgba(248, 241, 224, 0.45);
  font-family: var(--display-cinema);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.table-label-line {
  height: 1px;
  width: min(60px, 14vw);
  background: linear-gradient(90deg, transparent, rgba(244, 203, 114, 0.4));
}

.table-label-line:last-child {
  background: linear-gradient(90deg, rgba(244, 203, 114, 0.4), transparent);
}

.cinema-label-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cinema-gold);
  letter-spacing: 0.16em;
}

.film {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: 100%;
  outline: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.film:focus-visible {
  outline: 2px solid rgba(244, 203, 114, 0.65);
  outline-offset: 4px;
  border-radius: 18px;
}

/* Faisceau lumineux de projection */
.projector-beam {
  position: absolute;
  top: -12%;
  left: 50%;
  transform: translateX(-50%);
  width: min(96vw, 680px);
  height: 115%;
  background: conic-gradient(from 180deg at 50% 0%, transparent 68deg, rgba(255, 235, 175, 0.05) 83deg, rgba(255, 235, 175, 0.14) 90deg, rgba(255, 235, 175, 0.05) 97deg, transparent 112deg);
  pointer-events: none;
  opacity: 0.85;
  animation: beamGlow 12s ease-in-out infinite alternate;
}

@keyframes beamGlow {
  0%, 100% { opacity: 0.75; transform: translateX(-50%) scaleX(1); }
  50% { opacity: 0.95; transform: translateX(-50%) scaleX(1.04); }
}

.projector-lens-glow {
  position: absolute;
  width: min(88vw, 580px);
  height: min(88vw, 580px);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(244, 203, 114, 0.11) 0%, rgba(244, 203, 114, 0.03) 45%, transparent 72%);
  pointer-events: none;
}

/* Clignotement de l'obturateur rotatif lors du changement de photogramme */
.shutter-flicker {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 12, 0.45);
  pointer-events: none;
  opacity: 0;
  z-index: 8;
}

.shutter-flicker.is-flickering {
  animation: shutterFlick 0.18s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@keyframes shutterFlick {
  0% { opacity: 0; }
  30% { opacity: 0.55; }
  60% { opacity: 0.15; }
  85% { opacity: 0.4; }
  100% { opacity: 0; }
}

/* Rails métalliques latéraux du couloir de projection */
.gate-guide {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: min(82vh, 520px);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  pointer-events: none;
  z-index: 4;
}

.gate-guide-left {
  left: calc(50% - (var(--card-w, min(72vw, 44dvh, 320px)) / 2) - 13px);
}

.gate-guide-right {
  right: calc(50% - (var(--card-w, min(72vw, 44dvh, 320px)) / 2) - 13px);
}

.gate-sprocket {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(135deg, #c49332, #6b4c13);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 240, 200, 0.4);
  border: 1px solid rgba(15, 16, 20, 0.8);
}

/* Fenêtre de projection (aperture) */
.projector-viewport {
  position: relative;
  width: var(--card-w, min(72vw, 44dvh, 320px));
  aspect-ratio: 280 / 430;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Couloir de film / piste de défilement */
.film-track {
  position: absolute;
  inset: 0;
  transition: transform 0.16s ease;
  filter: drop-shadow(0 26px 45px rgba(0, 0, 0, 0.75));
}

.film:active .film-track {
  transform: scale(0.985);
}

/* Photogramme 35mm */
.film-card {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #0f1013;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 235, 185, 0.15);
  will-change: transform;
}

/* Animation d'à-coup saccadé de la croix de Malte */
.film-card.is-jerking {
  animation: filmStepDown 0.28s cubic-bezier(0.12, 0.98, 0.22, 1.15) both;
}

@keyframes filmStepDown {
  0% {
    transform: translateY(-88%);
    opacity: 0.92;
    filter: brightness(0.65) contrast(1.15);
  }
  26% {
    /* Descente ultra-rapide de l'ergot */
    transform: translateY(14px);
    filter: brightness(0.6) contrast(1.2);
  }
  54% {
    /* Rebond mécanique / overshoot */
    transform: translateY(-5px);
    filter: brightness(1.1);
  }
  78% {
    transform: translateY(2px);
    filter: brightness(0.98);
  }
  100% {
    transform: translateY(0);
    opacity: 1;
    filter: brightness(1);
  }
}

.film-card.is-past-frame {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.film-card.is-active-frame {
  opacity: 1;
}

.film-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 240, 200, 0.2);
  pointer-events: none;
}

.film-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Tampon "ARRÊT SUR IMAGE" lors de l'appui */
.freeze-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-6deg);
  z-index: 12;
  pointer-events: none;
}

.freeze-stamp.is-stamped {
  animation: stampIn 0.32s cubic-bezier(0.18, 1.2, 0.28, 1) both;
}

@keyframes stampIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(12deg) scale(2.2);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-7deg) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-6deg) scale(1);
  }
}

.freeze-stamp-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 12px;
  background: rgba(143, 31, 29, 0.88);
  border: 3px solid #ffeaab;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.85), inset 0 0 12px rgba(0, 0, 0, 0.4);
  color: #fffaf0;
  text-align: center;
}

.freeze-stamp-kicker {
  font-family: var(--display-cinema);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--cinema-gold);
}

.freeze-stamp-title {
  font-family: var(--display-cinema);
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Amorce de film (film-placeholder) */
.film-placeholder {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  pointer-events: none;
  text-align: center;
  z-index: 2;
}

.leader-prompt {
  margin: 0;
  font-family: var(--display-cinema);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cinema-gold);
  animation: pulseSoft 2.2s ease-in-out infinite;
}

.leader-card {
  width: var(--card-w, min(72vw, 44dvh, 320px));
  aspect-ratio: 280 / 430;
  border-radius: 8px;
  background: #0f1013;
  box-shadow: var(--shadow-card);
  border: 2px solid rgba(244, 203, 114, 0.4);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.leader-concentric {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.leader-cross-h {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(244, 203, 114, 0.35);
}

.leader-cross-v {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(244, 203, 114, 0.35);
}

.leader-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(244, 203, 114, 0.35);
}

.leader-ring-1 {
  width: 82%;
  height: 54%;
  border-width: 2px;
}

.leader-ring-2 {
  width: 65%;
  height: 42%;
}

.leader-ring-3 {
  width: 48%;
  height: 31%;
  border-style: dashed;
}

.leader-center-badge {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 24px;
  border-radius: 14px;
  background: rgba(18, 20, 25, 0.94);
  border: 1px solid rgba(244, 203, 114, 0.6);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7);
}

.leader-icon {
  width: 32px;
  height: 32px;
  color: var(--cinema-gold);
}

@keyframes pulseSoft {
  0%, 100% { opacity: 0.42; }
  50% { opacity: 0.82; }
}

.tap-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 241, 208, 0.24), transparent 52%);
}

.tap-flash.is-flashing {
  animation: tapFlash 0.32s ease-out;
}

@keyframes tapFlash {
  from { opacity: 1; }
  to { opacity: 0; }
}

.game-caption {
  flex: 0 0 auto;
  padding: 4px 16px calc(10px + var(--safe-bottom));
  text-align: center;
  min-height: 62px;
}

.game-hint {
  margin: 0;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(248, 241, 224, 0.55);
}

.game-status {
  margin: 3px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-soft);
  min-height: 19px;
}

.game-toast {
  position: absolute;
  left: 50%;
  top: 4px;
  z-index: 6;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 10px 16px;
  border-radius: 13px;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  color: #3b2503;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
  animation: toastIn 0.35s cubic-bezier(0.2, 0.9, 0.2, 1.2);
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -10px) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* --------------------------- Compte à rebours ---------------------------- */

/* --------------------- Compte à rebours 1920s Film Leader ----------------- */

.countdown-cinema {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(8, 9, 12, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.countdown-leader {
  position: relative;
  width: min(78vw, 340px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(244, 203, 114, 0.12), transparent 65%),
    #101115;
  border: 3px solid rgba(244, 203, 114, 0.7);
  box-shadow: 0 0 60px rgba(244, 203, 114, 0.25), inset 0 0 40px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.leader-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg at 50% 50%, rgba(244, 203, 114, 0.35) 0deg, transparent 45deg, transparent 360deg);
  animation: sweepClock 0.7s linear infinite;
  pointer-events: none;
}

@keyframes sweepClock {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.leader-cross-h {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(244, 203, 114, 0.5);
  pointer-events: none;
}

.leader-cross-v {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(244, 203, 114, 0.5);
  pointer-events: none;
}

.leader-ring-outer {
  position: absolute;
  width: 82%;
  height: 82%;
  border-radius: 50%;
  border: 2px solid rgba(244, 203, 114, 0.6);
  pointer-events: none;
}

.leader-ring-inner {
  position: absolute;
  width: 60%;
  height: 60%;
  border-radius: 50%;
  border: 1px dashed rgba(244, 203, 114, 0.45);
  pointer-events: none;
}

.leader-number {
  position: relative;
  z-index: 4;
  font-family: var(--display-cinema);
  font-size: clamp(80px, 24vw, 128px);
  font-weight: 900;
  line-height: 1;
  color: #fffdf8;
  text-shadow: 0 4px 0 #5c3f10, 0 10px 30px rgba(244, 203, 114, 0.6);
  animation: leaderPop 0.6s cubic-bezier(0.18, 0.9, 0.22, 1.2);
}

@keyframes leaderPop {
  0% { transform: scale(1.35); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* --------------------------- Modales Cinéma ------------------------------ */

dialog.modal {
  border: 0;
  padding: 0;
  background: transparent;
  width: min(100% - 24px, 500px);
  max-width: none;
  max-height: none;
  color: var(--cream);
}

dialog.modal::backdrop {
  background: rgba(5, 6, 8, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

dialog.modal[open] .modal-card {
  animation: modalIn 0.38s cubic-bezier(0.18, 0.9, 0.22, 1.1);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-card {
  position: relative;
  width: 100%;
  max-height: min(92dvh, 840px);
  overflow-y: auto;
  padding: 24px 20px calc(20px + var(--safe-bottom));
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 0%, rgba(244, 203, 114, 0.16), transparent 55%),
    linear-gradient(170deg, #181a20, #0f1014 65%, #08090c);
  color: var(--cream);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 240, 200, 0.25);
  border: 2px solid rgba(244, 203, 114, 0.6);
  overscroll-behavior: contain;
}

.modal-card-narrow {
  text-align: center;
}

.modal-handle {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(244, 203, 114, 0.3);
  margin: -8px auto 18px;
}

.pause-icon-cinema {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: rgba(244, 203, 114, 0.14);
  border: 1px solid rgba(244, 203, 114, 0.4);
  color: var(--cinema-gold);
}

.modal-title {
  margin: 0 0 6px;
  font-family: var(--display-cinema);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #fffdf8;
}

.modal-text {
  margin: 0 auto 20px;
  max-width: 320px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--cream-soft);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 18px;
}

.modal-actions .btn {
  width: 100%;
}

/* ------------------- Résultat Intertitre Muet 1920 ----------------------- */

.modal-cinema-result {
  width: min(100% - 20px, 560px);
}

.modal-card-intertitle {
  padding: 26px 22px calc(22px + var(--safe-bottom));
  border: 2px solid rgba(244, 203, 114, 0.7);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(244, 203, 114, 0.2);
}

/* Écoinçons Art Déco (coins biseautés des intertitres de cinéma muet) */
.deco-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--cinema-gold);
  border-style: solid;
  pointer-events: none;
}

.deco-tl {
  top: 10px;
  left: 10px;
  border-width: 2px 0 0 2px;
}

.deco-tr {
  top: 10px;
  right: 10px;
  border-width: 2px 2px 0 0;
}

.deco-bl {
  bottom: 10px;
  left: 10px;
  border-width: 0 0 2px 2px;
}

.deco-br {
  bottom: 10px;
  right: 10px;
  border-width: 0 2px 2px 0;
}

.intertitle-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.intertitle-filigree {
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 203, 114, 0.5), transparent);
}

.intertitle-brand {
  font-family: var(--display-cinema);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--cinema-gold);
}

.result-badge-cinema {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(145deg, #2b6e4b, #15452d);
  color: #fffdf8;
  border: 2px solid rgba(244, 203, 114, 0.8);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6), 0 0 20px rgba(67, 169, 119, 0.35);
}

.result-badge-cinema.is-fail {
  background: linear-gradient(145deg, #a32c25, #631411);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6), 0 0 20px rgba(184, 65, 38, 0.35);
}

.result-badge-cinema .icon {
  width: 32px;
  height: 32px;
}

.result-kicker {
  margin: 0;
  font-family: var(--display-cinema);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cinema-gold);
}

.result-title-cinema {
  margin: 6px 0 14px;
  font-family: var(--display-cinema);
  font-size: clamp(32px, 8.5vw, 44px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.03em;
  color: #fffdf8;
  text-shadow: 0 4px 0 #583c0f, 0 10px 24px rgba(244, 203, 114, 0.3);
}

.result-summary.is-fail .result-title-cinema {
  text-shadow: 0 4px 0 #4a1310, 0 10px 24px rgba(163, 50, 36, 0.3);
}

/* Cartouche Marquee d'affichage des œufs */
.result-marquee-frame {
  margin: 12px auto 16px;
  max-width: 380px;
  padding: 4px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(244, 203, 114, 0.5), rgba(196, 147, 50, 0.2));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

.result-marquee-inner {
  padding: 12px 18px;
  border-radius: 10px;
  background: #111218;
  border: 1px dashed rgba(244, 203, 114, 0.4);
}

.marquee-subtitle {
  display: block;
  font-family: var(--display-cinema);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--cinema-gold);
  margin-bottom: 4px;
}

.result-count-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin: 2px 0 4px;
}

.result-count {
  font-family: var(--display-cinema);
  font-size: clamp(68px, 18vw, 96px);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.02em;
  color: var(--cinema-gold);
  text-shadow: 0 4px 12px rgba(244, 203, 114, 0.4);
  font-variant-numeric: tabular-nums;
}

.result-summary.is-fail .result-count {
  color: #ff9180;
  text-shadow: 0 4px 12px rgba(217, 81, 63, 0.4);
}

.result-count-label {
  max-width: 96px;
  text-align: left;
  font-family: var(--display-cinema);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream-soft);
}

.marquee-target-indicator {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.result-text-cinema {
  max-width: 420px;
  margin: 0 auto 16px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--cream-soft);
}

.result-meta-cinema {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(244, 203, 114, 0.08);
  border: 1px solid rgba(244, 203, 114, 0.22);
  color: var(--cream-soft);
  font-family: var(--display-cinema);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Billets d'admission de cinéma pour les actions */
.cinema-ticket-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.btn-ticket {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 12px;
  text-align: left;
  font-family: var(--display-cinema);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.btn-ticket:hover {
  transform: translateY(-2px);
}

.btn-ticket .icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.ticket-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ticket-text strong {
  font-size: 15px;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.ticket-text small {
  font-family: var(--body);
  font-size: 11px;
  opacity: 0.75;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.btn-ticket-primary {
  background: linear-gradient(135deg, #fce296, #d99c27) !important;
  color: #2b1d03 !important;
  border: 1px solid rgba(255, 240, 200, 0.8) !important;
  box-shadow: 0 10px 24px rgba(196, 147, 50, 0.35) !important;
}

.btn-ticket-secondary {
  background: linear-gradient(135deg, #252833, #181920) !important;
  color: var(--cream) !important;
  border: 1px solid rgba(244, 203, 114, 0.45) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4) !important;
}

.btn-ticket-secondary .icon {
  color: var(--cinema-gold);
}

.btn-ticket-quiet {
  background: transparent !important;
  color: var(--cream-soft) !important;
  border: 1px dashed rgba(244, 203, 114, 0.3) !important;
}

.btn-ticket-quiet:hover {
  background: rgba(244, 203, 114, 0.08) !important;
}

/* ----------------- Table de montage / Ralenti 35mm ----------------------- */

.result-replay {
  text-align: left;
}

.replay-head-cinema {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(244, 203, 114, 0.25);
}

.replay-head-cinema .round-icon-btn {
  background: rgba(244, 203, 114, 0.12);
  border: 1px solid rgba(244, 203, 114, 0.35);
  color: var(--cinema-gold);
}

.replay-title-cinema {
  margin: 2px 0 0;
  font-family: var(--display-cinema);
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #fffdf8;
}

.count-pill-cinema {
  background: rgba(244, 203, 114, 0.12);
  border: 1px solid rgba(244, 203, 114, 0.3);
  color: var(--cinema-gold);
  font-family: var(--display-cinema);
  font-size: 11px;
}

.replay-list-cinema {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 48dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.replay-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(18, 20, 26, 0.75);
  border: 1px solid rgba(244, 203, 114, 0.18);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.replay-item.is-crossing {
  background: rgba(196, 147, 50, 0.18);
  border-color: rgba(244, 203, 114, 0.55);
  box-shadow: 0 0 18px rgba(244, 203, 114, 0.2);
}

.replay-thumb-wrap {
  position: relative;
  width: 44px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(244, 203, 114, 0.35);
  background: #000;
}

.replay-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.replay-seq {
  position: absolute;
  top: 2px;
  left: 2px;
  font-size: 9px;
  font-weight: 800;
  font-family: var(--display-cinema);
  background: rgba(10, 11, 14, 0.85);
  color: var(--cinema-gold);
  padding: 1px 4px;
  border-radius: 3px;
  line-height: 1;
}

.replay-copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.replay-card-name {
  font-family: var(--display-cinema);
  font-size: 14px;
  font-weight: 700;
  color: #fffaf0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.crossing-flag {
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--cinema-gold);
  color: #2a1b02;
  font-weight: 800;
}

.replay-effect {
  font-size: 11.5px;
  color: var(--cream-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.replay-egg {
  flex: 0 0 auto;
  min-width: 44px;
  padding: 4px 6px;
  border-radius: 8px;
  background: rgba(244, 203, 114, 0.1);
  border: 1px solid rgba(244, 203, 114, 0.3);
  text-align: center;
  font-family: var(--display-cinema);
  font-size: 17px;
  font-weight: 900;
  color: var(--cinema-gold);
  line-height: 1;
}

.replay-egg.is-good {
  background: linear-gradient(135deg, #fce296, #d99c27);
  color: #2b1d03;
  border-color: #fff;
}

.replay-egg-label {
  display: block;
  font-size: 8.5px;
  font-family: var(--body);
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 1px;
}

/* --------------------------- Responsive / a11y --------------------------- */

@media (min-width: 560px) {
  .menu {
    padding-top: calc(30px + var(--safe-top));
  }

  .hero {
    padding-bottom: 38px;
  }

  .settings {
    #grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .settings > .section-heading,
  .settings > .panel:first-of-type,
  .settings > .panel-rules,
  .settings > .reset-link,
  .menu-footer {
    grid-column: 1 / -1;
  }

  .panel {
    padding: 20px;
  }

  .modal-card {
    padding: 28px 26px 24px;
  }

  .modal-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .modal-actions .btn {
    width: auto;
    flex: 1 1 auto;
    min-width: 130px;
  }

  .modal-actions .btn-primary {
    flex-grow: 1.4;
  }
}

@media (max-width: 380px) {
  .preset-row {
    grid-template-columns: 1fr 1fr;
  }

  .preset-chip:last-child {
    grid-column: 1 / -1;
    min-height: 52px;
  }

  .deck-editor-grid {
    grid-template-columns: 1fr;
  }

  .deck-row {
    padding: 7px 8px;
  }
}

@media (max-height: 620px) and (orientation: portrait) {
  .game-caption {
    min-height: 52px;
    padding-bottom: calc(6px + var(--safe-bottom));
  }

  .table-label {
    margin: 0;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .game-bar {
    padding: 5px 10px 2px;
  }

  .round-icon-btn,
  .deck-left {
    width: 36px;
    height: 36px;
    min-width: 36px;
  }

  .round-icon-btn .icon {
    width: 17px;
    height: 17px;
  }

  .game-round {
    font-size: 13px;
  }

  .game-objective {
    font-size: 8px;
  }

  .table {
    padding: 0 10px;
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  .table-label {
    display: none;
  }

  .film {
    flex: 1 1 auto;
    width: auto;
  }

  .pile,
  .projector-viewport,
  .leader-card,
  .card-back {
    --card-w: min(37dvh, 29vw, 230px);
  }

  .game-caption {
    position: absolute;
    right: 8px;
    bottom: calc(6px + var(--safe-bottom));
    left: auto;
    width: 190px;
    min-height: 0;
    padding: 0;
    text-align: right;
  }

  .game-hint {
    font-size: 8px;
    letter-spacing: 0.08em;
  }

  .game-status {
    font-size: 11px;
    min-height: 0;
  }

  .game-toast {
    top: 2px;
    font-size: 11px;
    padding: 7px 12px;
  }

  .modal-card {
    max-height: 94dvh;
    padding-top: 18px;
  }

  .result-badge {
    width: 50px;
    height: 50px;
    margin-bottom: 8px;
  }

  .result-badge .icon {
    width: 24px;
    height: 24px;
  }

  .result-title {
    margin-bottom: 4px;
  }

  .result-count-wrap {
    margin: 2px 0 4px;
  }

  .result-count {
    font-size: 58px;
  }

  .replay-list {
    max-height: 34dvh;
  }
}

@media (hover: none) {
  .film:hover .pile {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 100;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--tomato);
  color: #fff;
  font-weight: 700;
  text-align: center;
}

/* Sélection du texte discrète dans le menu uniquement. */
.settings,
.hero {
  -webkit-user-select: none;
  user-select: none;
}
