/* ============================================================
   Pop Empire — Style global
   Inspiré du Codex : gradient violet/rose, fond sombre, cartes glass
   ============================================================ */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color: #f5edff;
  background: linear-gradient(135deg, #1a0e2e 0%, #2d1346 50%, #3d1652 100%);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.bg-decor {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 80, 180, 0.15), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(140, 80, 255, 0.18), transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  position: relative;
  z-index: 1;
}

.back-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  color: #f5edff;
  text-decoration: none;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
  transition: all 0.2s;
}
.back-link:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  margin: 1rem 0 2.5rem;
}
.title-link { text-decoration: none; color: inherit; display: inline-block; }
.hero h1 {
  margin: 0 0 0.5rem;
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ff6fc7 0%, #b87fff 50%, #7eaaff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}
.beta {
  font-size: 0.7rem;
  background: rgba(255, 80, 180, 0.3);
  color: #ffd8ec;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  vertical-align: middle;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-left: 0.5rem;
}
.tagline {
  margin: 0;
  color: #d6c5ec;
  font-size: 1.05rem;
}

/* ===== Cartes ===== */
.card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
}
.card h2, .card h3 {
  margin: 0 0 1rem;
  color: #f8f0ff;
}
.card h2 { font-size: 1.4rem; }
.card h3 { font-size: 1.15rem; }
.card h4 { margin: 1rem 0 0.5rem; color: #f5edff; }
.muted { color: #b6a4cc; font-size: 0.92em; }
.hint { color: #9c8bb5; font-size: 0.85rem; margin: 0.4rem 0 0; }

/* ===== Forms ===== */
form label {
  display: block;
  margin-bottom: 1rem;
  color: #d6c5ec;
  font-size: 0.92rem;
}
form input, form select {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 0.9rem;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  font-family: inherit;
}
form input:focus, form select:focus {
  outline: none;
  border-color: #c89aff;
  background: rgba(0,0,0,0.4);
}

/* ===== Boutons ===== */
.btn-primary {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  background: linear-gradient(135deg, #c855ff 0%, #ff6fc7 100%);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(200,85,255,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(200,85,255,0.45); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  background: rgba(255,255,255,0.08);
  color: #f5edff;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.15s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.15); }

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: #d6c5ec;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); }

.btn-action {
  margin-top: 0.8rem;
  padding: 0.55rem 1.1rem;
  background: linear-gradient(135deg, #8a40d6 0%, #c855ff 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s;
}
.btn-action:hover { transform: translateY(-1px); }
.btn-action:disabled {
  background: rgba(255,255,255,0.08);
  color: #8a7c9c;
  cursor: not-allowed;
  transform: none;
}

.error {
  color: #ff8c8c;
  background: rgba(255,80,80,0.12);
  border: 1px solid rgba(255,80,80,0.3);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  margin: 0.8rem 0 0;
  font-size: 0.9rem;
}

.footer {
  margin-top: 3rem;
  text-align: center;
  font-size: 0.85rem;
}

/* ===== User bar ===== */
.user-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.user-bar strong { font-size: 1rem; margin-right: 0.8rem; color: #ffb3df; }
.stat {
  display: inline-block;
  margin-right: 0.6rem;
  font-size: 0.92rem;
  color: #d6c5ec;
}

/* ===== Tableau historique ===== */
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.history-table th {
  text-align: left;
  padding: 0.6rem 0.5rem;
  color: #a890c8;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.history-table td {
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.history-table a { color: #ffb3df; text-decoration: none; }
.history-table a:hover { text-decoration: underline; }

.tag {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.tag-preparation { background: rgba(120,180,255,0.2); color: #a8c8ff; }
.tag-en_cours    { background: rgba(255,180,80,0.2); color: #ffd0a0; }
.tag-terminee    { background: rgba(80,220,150,0.2); color: #a8e8c8; }
.tag-faillite    { background: rgba(255,80,80,0.2); color: #ff9090; }

/* ============================================================
   Page de jeu ARCADE (partie.php)
   ============================================================ */

.arcade-stage {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.8rem 1rem 1.2rem;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 100vh;
}

/* ===== Header compact ===== */
.arcade-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 0.7rem 1rem;
  backdrop-filter: blur(10px);
}
.arcade-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 1;
  min-width: 0;
}
.back-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  color: #f5edff;
  text-decoration: none;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: all 0.15s;
}
.back-arrow:hover { background: rgba(255,255,255,0.15); transform: translateX(-2px); }
.arcade-title h1 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ff6fc7 0%, #b87fff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.arcade-title .conv-sub {
  color: #b6a4cc;
  font-size: 0.85rem;
  margin-left: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.arcade-header-stats {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}
.stat-pill .lbl { font-size: 1rem; }
.stat-pill .val { font-weight: 700; color: #fff; }
.stat-pill .val.val-good { color: #8de8b8; }
.stat-pill .val.val-mid  { color: #ffd48a; }
.stat-pill .val.val-bad  { color: #ff9090; }

/* Pill spéciale visiteurs attendus : mise en évidence */
.stat-visitors {
  background: linear-gradient(135deg, rgba(200, 85, 255, 0.25) 0%, rgba(255, 111, 199, 0.18) 100%);
  border: 1px solid rgba(200, 85, 255, 0.5);
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 12px rgba(200, 85, 255, 0.2);
}
.stat-visitors .lbl { font-size: 1.2rem; }
.stat-visitors .val {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffd6f5;
  font-variant-numeric: tabular-nums;
}
.stat-visitors .lbl-sub {
  font-size: 0.7rem;
  color: #c8a8d8;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-left: 0.2rem;
}

/* ===== Histogramme grand format ===== */
.hist-board {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 0.9rem 1rem 0.6rem;
  backdrop-filter: blur(8px);
  min-height: 220px;
}
.hist-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-width: 0;
}
.hist-bar[data-key="tresorerie"] {
  flex: 1.4;
  position: relative;
}
.hist-bar[data-key="tresorerie"]::before {
  content: '';
  position: absolute;
  inset: -4px -2px;
  background: linear-gradient(180deg, rgba(255,212,80,0.08), rgba(255,180,80,0.02));
  border-radius: 10px;
  border: 1px solid rgba(255,212,80,0.2);
  z-index: -1;
}
.hist-bar[data-key="tresorerie"] .hist-num {
  color: #ffd48a;
}
.hist-pop {
  position: absolute;
  top: -4px;
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
  pointer-events: none;
  z-index: 5;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}
.hist-pop.pop-good { color: #8de8b8; transform: translateY(-12px); }
.hist-pop.pop-bad  { color: #ff9090; transform: translateY(-12px); }
.hist-track {
  width: 100%;
  flex: 1;
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-end;
  border: 1px solid rgba(255,255,255,0.08);
}
.hist-fill {
  width: 100%;
  border-radius: 5px 5px 0 0;
  transition: height 0.7s cubic-bezier(0.34, 1.4, 0.5, 1), background 0.4s;
  box-shadow: inset 0 -3px 10px rgba(0,0,0,0.2), 0 -2px 12px rgba(255,255,255,0.05);
}
.hist-fill.fill-good { background: linear-gradient(180deg, #8de8b8 0%, #50d8a0 100%); }
.hist-fill.fill-mid  { background: linear-gradient(180deg, #ffd48a 0%, #ffb35a 100%); }
.hist-fill.fill-bad  { background: linear-gradient(180deg, #ff9090 0%, #ff5a8a 100%); }
.hist-num {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-top: 0.4rem;
  font-variant-numeric: tabular-nums;
}
.hist-counter {
  font-size: 0.7rem;
  font-weight: 600;
  color: #d6c5ec;
  margin-top: 0.15rem;
  font-variant-numeric: tabular-nums;
  min-height: 1em;
  letter-spacing: 0.02em;
}
.hist-counter .cnt-empty { color: #6b5b85; }
.hist-counter .cnt-some  { color: #ffd48a; }
.hist-counter .cnt-full  { color: #8de8b8; }
.hist-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #b6a4cc;
  text-align: center;
  margin-top: 0.2rem;
  line-height: 1.1;
}

/* ===== Frise des semaines ===== */
.weeks-frise {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.4rem 0.5rem;
}
.weeks-bar {
  flex: 1;
  height: 8px;
  background: rgba(0,0,0,0.3);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
}
.weeks-fill {
  height: 100%;
  background: linear-gradient(90deg, #c855ff, #ff6fc7);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.34, 1.4, 0.5, 1);
  box-shadow: 0 0 10px rgba(200,85,255,0.4);
}
.weeks-label {
  color: #d6c5ec;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ===== Zone principale : actions + journal ===== */
.arcade-main {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1rem;
  align-items: start;
}

/* ===== Grille d'actions ===== */
.actions-zone {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 0.9rem;
  backdrop-filter: blur(8px);
}
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
  gap: 0.7rem;
}
.no-actions {
  color: #b6a4cc;
  text-align: center;
  padding: 2rem 1rem;
  font-style: italic;
}

.action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.9rem 0.5rem 0.7rem;
  background: linear-gradient(160deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  color: #f5edff;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: transform 0.12s, box-shadow 0.15s, border-color 0.15s;
  min-height: 110px;
}
.action-card:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(255,111,199,0.5);
  box-shadow: 0 6px 20px rgba(200,85,255,0.25);
}
.action-card:active:not(:disabled) {
  transform: translateY(0) scale(0.97);
}
.action-card:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Couleur d'accent par catégorie (bordure haute fine) */
.action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--cat-color, #b87fff);
}
.action-card.cat-logistique { --cat-color: #5aaaff; }
.action-card.cat-guest      { --cat-color: #ff6fc7; }
.action-card.cat-com        { --cat-color: #ffb35a; }
.action-card.cat-stands     { --cat-color: #8de8b8; }
.action-card.cat-finance    { --cat-color: #ffd44a; }
.action-card.cat-hype       { --cat-color: #ee5577; }
.action-card.cat-perso      { --cat-color: #c8a8ff; }

.action-icon {
  font-size: 1.6rem;
  line-height: 1;
}
.action-name {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.15;
  color: #f5edff;
}
.action-price {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
  margin-top: auto;
}
.price-cost    { background: rgba(255,90,138,0.15); color: #ff9aaf; }
.price-recette { background: rgba(80,220,150,0.15); color: #8de8b8; }

.action-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.action-badge.badge-oblig { background: #ffb35a; color: #1a0e2e; }
.action-badge.badge-risk  { background: rgba(255,90,138,0.9); color: #fff; left: 4px; right: auto; }

/* ===== Journal compact ===== */
.journal {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 0.8rem;
  backdrop-filter: blur(8px);
  max-height: 420px;
  display: flex;
  flex-direction: column;
}
.journal-head {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b88de0;
  font-weight: 700;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.journal-date {
  color: #ffd48a;
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
}
.journal-title {
  color: #b88de0;
}
.journal-list {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-y: auto;
  flex: 1;
}
.journal-list li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  padding: 0.45rem 0.3rem;
  font-size: 0.85rem;
  border-bottom: 1px dashed rgba(255,255,255,0.05);
  animation: jl-in 0.4s ease-out;
}
.journal-list li:last-child { border-bottom: none; }
.journal-list li.log-fail { opacity: 0.65; }
.journal-list li.journal-empty {
  color: #8a7c9c;
  font-style: italic;
  border: none;
  justify-content: center;
}
.jl-week {
  flex-shrink: 0;
  font-weight: 700;
  color: #ffb3df;
  font-size: 0.78rem;
  background: rgba(255,111,199,0.12);
  padding: 0.05rem 0.45rem;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}
.jl-narr {
  color: #d6c5ec;
  line-height: 1.3;
}

@keyframes jl-in {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ===== Footer abandon ===== */
.arcade-footer {
  text-align: center;
  margin-top: 0.5rem;
}
.btn-abandon {
  font-size: 0.8rem;
  opacity: 0.6;
}
.btn-abandon:hover { opacity: 1; }

/* ===== Zone Prix du billet (au-dessus du journal) ===== */
.journal-zone {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.prix-billet-card {
  background: rgba(255, 212, 80, 0.08);
  border: 1px solid rgba(255, 212, 80, 0.25);
  border-radius: 16px;
  padding: 0.8rem;
  backdrop-filter: blur(8px);
}
.prix-head {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffd48a;
  font-weight: 700;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(255,212,80,0.15);
}
.prix-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}
.prix-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,212,80,0.3);
  background: rgba(255,212,80,0.08);
  color: #ffd48a;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  transition: all 0.15s;
}
.prix-btn:hover:not(:disabled) {
  background: rgba(255,212,80,0.18);
  transform: scale(1.05);
}
.prix-btn:active:not(:disabled) {
  transform: scale(0.95);
}
.prix-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.prix-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffd48a;
  font-variant-numeric: tabular-nums;
  min-width: 70px;
  text-align: center;
  transition: transform 0.15s;
}
.prix-value.prix-pulse {
  transform: scale(1.15);
}
.prix-status {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #b6a4cc;
  text-align: center;
}
.prix-status.locked { color: #ff9aaf; font-weight: 600; }

/* ===== Projection bénéfice/perte sur la barre tréso ===== */
.hist-track-money {
  position: relative;
  overflow: visible; /* permet à la projection de dépasser */
}
.hist-projection {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  border-radius: 4px;
  z-index: 1;
  transition: height 0.5s cubic-bezier(0.34, 1.4, 0.5, 1),
              bottom 0.5s cubic-bezier(0.34, 1.4, 0.5, 1),
              background 0.3s;
  pointer-events: none;
}
.hist-projection.proj-positive {
  background: linear-gradient(180deg,
              rgba(141, 232, 184, 0.85) 0%,
              rgba(80, 216, 160, 0.55) 100%);
  border: 1px solid rgba(141, 232, 184, 0.6);
  border-bottom: none;
  box-shadow: 0 0 12px rgba(141, 232, 184, 0.3);
}
.hist-projection.proj-negative {
  background: repeating-linear-gradient(
              45deg,
              rgba(255, 90, 138, 0.4),
              rgba(255, 90, 138, 0.4) 4px,
              rgba(255, 90, 138, 0.6) 4px,
              rgba(255, 90, 138, 0.6) 8px);
  border: 1px solid rgba(255, 90, 138, 0.5);
}
.hist-projection-num {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
  z-index: 3;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  transition: bottom 0.5s cubic-bezier(0.34, 1.4, 0.5, 1);
  pointer-events: none;
}
.proj-num-good { color: #8de8b8; }
.proj-num-bad  { color: #ff9aaf; }

/* La barre money a besoin de plus d'espace en haut pour la projection */
.hist-money .hist-track {
  margin-top: 1rem; /* place pour le chiffre de projection */
}

/* ===== Toast (réutilisé) ===== */
.toast {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 8, 32, 0.95);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  z-index: 100;
  backdrop-filter: blur(10px);
  font-size: 0.92rem;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
  animation: toast-in 0.25s ease-out;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.toast-success { border-color: rgba(80,220,150,0.4); color: #c8f4dc; }
.toast-warn    { border-color: rgba(255,180,80,0.4); color: #ffe0b8; }
.toast-error   { border-color: rgba(255,80,80,0.4); color: #ffc0c0; }
.toast-info    { border-color: rgba(120,180,255,0.4); color: #d8e6ff; }

/* ===== Modal choix de salle ===== */
[hidden] { display: none !important; }
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 5, 20, 0.78);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: modal-bg-in 0.2s ease-out;
  padding: 1rem;
}
@keyframes modal-bg-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal-box {
  background: linear-gradient(160deg, #2a1144 0%, #1a0e2e 100%);
  border: 1px solid rgba(200, 85, 255, 0.3);
  border-radius: 18px;
  padding: 1.4rem;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: modal-box-in 0.25s cubic-bezier(0.34, 1.4, 0.5, 1);
}
@keyframes modal-box-in {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.modal-head h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #ffb3df;
}
.modal-close {
  background: none;
  border: none;
  color: #b6a4cc;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 50%;
  transition: all 0.15s;
}
.modal-close:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.modal-sub {
  color: #d6c5ec;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}
.salle-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.salle-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.8rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #f5edff;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: transform 0.12s, border-color 0.15s, background 0.15s;
}
.salle-item:hover:not(:disabled) {
  background: rgba(255,255,255,0.07);
  border-color: rgba(200, 85, 255, 0.5);
  transform: translateX(2px);
}
.salle-item:active:not(:disabled) {
  transform: translateX(0) scale(0.99);
}
.salle-item.too-expensive {
  opacity: 0.5;
  cursor: not-allowed;
}
.salle-row1 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.salle-tag {
  display: inline-block;
  width: 28px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 5px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}
.salle-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.98rem;
}
.salle-cost {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #ff9aaf;
  background: rgba(255,90,138,0.12);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.85rem;
}
.salle-cost.cost-bad {
  background: rgba(255,90,90,0.2);
  color: #ff7070;
}
.salle-row2 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  font-size: 0.78rem;
  color: #b6a4cc;
}
.modal-error {
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 80, 80, 0.4);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  color: #ffc0c0;
  font-size: 0.9rem;
  line-height: 1.4;
}
.modal-error code {
  background: rgba(0,0,0,0.3);
  padding: 0.05rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}
.modal-error pre {
  background: rgba(0,0,0,0.4);
  padding: 0.5rem;
  border-radius: 6px;
  color: #ffd8ec;
}

/* ===== Modal calendrier ===== */
.modal-calendar {
  max-width: 500px;
}
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin: 1rem 0 1.2rem;
}
.cal-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #f5edff;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  transition: all 0.15s;
}
.cal-nav-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.15);
  transform: scale(1.05);
}
.cal-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.cal-month-label {
  font-size: 1.3rem;
  font-weight: 800;
  color: #ffb3df;
  letter-spacing: 0.02em;
  min-width: 200px;
  text-align: center;
}

.calendar-grid {
  background: #f5f0ff;
  border-radius: 10px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

.cal-row {
  position: relative;
  display: flex;
  align-items: center;
  height: 70px;
  padding: 0 1rem;
  background: #fff;
  border-bottom: 1px solid #e0d6ed;
  cursor: pointer;
  transition: background 0.15s;
  overflow: hidden;
}
.cal-row:last-child { border-bottom: none; }

.cal-row:hover:not(.cal-row-disabled) {
  background: #f0e8ff;
}

.cal-row-disabled {
  cursor: not-allowed;
  background: #ebebeb;
  opacity: 0.5;
}

.cal-row-week {
  flex-shrink: 0;
  width: 50px;
  font-weight: 800;
  color: #6b5b85;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.cal-row-stamp-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cal-row-stamp {
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  /* Style "tampon cartoon/graffiti" : par défaut transparent, visible au survol */
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  transform: rotate(-3deg) scale(0.9);
  padding: 0.3rem 1rem;
  border-radius: 4px;
  border: 2px solid currentColor;
  display: inline-block;
  font-family: 'Impact', 'Arial Black', sans-serif;
  white-space: nowrap;
}

.cal-row:hover:not(.cal-row-disabled) .cal-row-stamp {
  opacity: 1;
  transform: rotate(-3deg) scale(1);
}

/* Couleurs des tampons selon difficulté */
.cal-row-stamp[data-diff="impossible"]   { color: #d62828; background: rgba(214, 40, 40, 0.08); }
.cal-row-stamp[data-diff="tres_dur"]      { color: #e85d00; background: rgba(232, 93, 0, 0.08); }
.cal-row-stamp[data-diff="normal"]        { color: #d9a200; background: rgba(217, 162, 0, 0.08); }
.cal-row-stamp[data-diff="facile"]        { color: #2d9a37; background: rgba(45, 154, 55, 0.08); }
.cal-row-stamp[data-diff="tres_facile"]   { color: #0096c7; background: rgba(0, 150, 199, 0.08); }
.cal-row-stamp[data-diff="past"] { display: none; }

/* Week-end : 2 carrés verts en bout de ligne, visibles seulement au survol */
.cal-row-weekend {
  display: flex;
  gap: 6px;
  margin-left: auto;
  margin-right: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}
.cal-row:hover:not(.cal-row-disabled) .cal-row-weekend { opacity: 1; }
.cal-we {
  width: 52px;
  height: 52px;
  background: #b9e9b9;
  border: 1px solid #8ed18e;
  border-radius: 5px;
}

/* Bouton date-picker dans le formulaire */
.date-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  width: 100%;
  text-align: left;
  margin-bottom: 1rem;
  font-family: inherit;
  font-size: 0.95rem;
}
.date-picker-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.date-picker-btn.date-picked {
  border-color: rgba(255, 111, 199, 0.5);
}
.date-picker-btn.date-picked.diff-impossible { border-color: #d62828; }
.date-picker-btn.date-picked.diff-tres_dur   { border-color: #e85d00; }
.date-picker-btn.date-picked.diff-normal     { border-color: #d9a200; }
.date-picker-btn.date-picked.diff-facile     { border-color: #2d9a37; }
.date-picker-btn.date-picked.diff-tres_facile { border-color: #0096c7; }

/* ===== Conventions réservées (sur l'index) ===== */
.reserved-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,212,80,0.18);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.reserved-row:last-child { margin-bottom: 0; }
.rr-name { font-weight: 700; color: #f5edff; flex: 1; min-width: 150px; }
.rr-place, .rr-date { color: #d6c5ec; font-size: 0.9rem; }
.rr-date { color: #ffd48a; font-weight: 600; }
.rr-btn {
  font-size: 0.85rem !important;
  padding: 0.45rem 0.9rem !important;
  margin: 0 !important;
}

/* ===== Zone Staff (sous le prix billet) ===== */
.staff-card {
  background: rgba(141, 232, 184, 0.06);
  border: 1px solid rgba(141, 232, 184, 0.22);
  border-radius: 16px;
  padding: 0.8rem;
  backdrop-filter: blur(8px);
}
.staff-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8de8b8;
  font-weight: 700;
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(141,232,184,0.15);
}
.staff-libre-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffd48a;
  background: rgba(255, 212, 138, 0.12);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: none;
}
.staff-domains {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.staff-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.staff-icon {
  font-size: 1rem;
  width: 1.2rem;
  text-align: center;
}
.staff-label {
  flex: 1;
  font-size: 0.85rem;
  color: #d6c5ec;
}
.staff-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(141,232,184,0.3);
  background: rgba(141,232,184,0.08);
  color: #8de8b8;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s;
}
.staff-btn:hover:not(:disabled) {
  background: rgba(141,232,184,0.18);
  transform: scale(1.1);
}
.staff-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.staff-count {
  min-width: 24px;
  text-align: center;
  font-weight: 800;
  color: #fff;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
}

/* ===== Modal draft guest ===== */
.guest-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.guest-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.8rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #f5edff;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: transform 0.12s, border-color 0.15s, background 0.15s;
}
.guest-item:hover:not(:disabled) {
  background: rgba(255,255,255,0.07);
  border-color: rgba(200, 85, 255, 0.5);
  transform: translateX(2px);
}
.guest-item:active:not(:disabled) {
  transform: translateX(0) scale(0.99);
}
.guest-item.too-expensive { opacity: 0.5; cursor: not-allowed; }
.guest-row1 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.guest-cat {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(200,85,255,0.18);
  color: #d8a8f0;
  flex-shrink: 0;
}
.guest-name {
  flex: 1;
  font-weight: 700;
  font-size: 0.98rem;
}
.guest-cost {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #ff9aaf;
  background: rgba(255,90,138,0.12);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.85rem;
}
.guest-cost.cost-bad { background: rgba(255,90,90,0.2); color: #ff7070; }
.guest-row2 {
  display: flex;
  gap: 1rem;
  font-size: 0.78rem;
}
.guest-noto { color: #ffd48a; font-weight: 600; }
.guest-effets { color: #d6c5ec; }
.guest-desc {
  font-size: 0.78rem;
  color: #b6a4cc;
  font-style: italic;
}
.guest-modal-foot {
  margin-top: 1rem;
  text-align: center;
}

/* ===== Modal calendrier (fin) ===== */

/* ===== Responsive arcade ===== */
@media (max-width: 720px) {
  .arcade-stage { padding: 0.5rem 0.6rem 1rem; gap: 0.6rem; }
  .arcade-header { padding: 0.5rem 0.7rem; }
  .arcade-title h1 { font-size: 1.1rem; }
  .arcade-title .conv-sub { display: none; }
  .stat-pill { padding: 0.3rem 0.6rem; font-size: 0.85rem; }
  .hist-board { padding: 0.6rem 0.4rem 0.4rem; min-height: 180px; gap: 0.3rem; }
  .hist-num { font-size: 0.95rem; }
  .hist-label { font-size: 0.55rem; }
  .arcade-main { grid-template-columns: 1fr; }
  .journal { max-height: 200px; }
  .actions-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.5rem; }
  .action-card { min-height: 95px; padding: 0.7rem 0.4rem 0.5rem; }
  .action-icon { font-size: 1.3rem; }
  .action-name { font-size: 0.75rem; }
  .action-price { font-size: 0.72rem; }
}

/* ===== Bilan ===== */
.banner {
  text-align: center;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  font-weight: 600;
}
.banner-bad {
  background: rgba(255,80,80,0.15);
  border: 1px solid rgba(255,80,80,0.4);
  color: #ffc0c0;
}

.bilan-headline {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.bilan-note {
  text-align: center;
  padding: 1rem 1.5rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  min-width: 130px;
}
.bilan-note .big-num {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}
.bilan-note .note-label { color: #a890c8; font-size: 0.9rem; }
.note-good { color: #8de8b8; }
.note-mid  { color: #ffd48a; }
.note-bad  { color: #ff9090; }

.bilan-key-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.bilan-key-stats > div {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.bilan-key-stats .label { color: #a890c8; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.bilan-key-stats strong { font-size: 1.4rem; }

.recit-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.recit-list li {
  padding: 0.7rem 1rem;
  background: rgba(255,255,255,0.04);
  border-left: 3px solid #c855ff;
  border-radius: 0 8px 8px 0;
  margin-bottom: 0.5rem;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .container { padding: 1.5rem 0.9rem 3rem; }
  .hero h1 { font-size: 1.9rem; }
  .game-header { flex-direction: column; }
  .header-stats { width: 100%; justify-content: space-between; }
  .stat-box { flex: 1; min-width: 0; }
  .back-link { padding: 0.3rem 0.7rem; font-size: 0.82rem; }
  .gauges-grid { grid-template-columns: repeat(2, 1fr); }
  .bilan-headline { flex-direction: column; }
}
