:root {
  --bg-asphalt: #0d0d10;
  --card-bg: #18181d;
  --card-border: #2a2a32;
  --yellow-bombing: #ffe600;
  --cyan-spray: #38bdf8;
  --white-chalk: #f4f4f0;
  --text-dim: #7c7c84;
  --red-alert: #ff3b30;
  --green-chrome: #30d158;
  --font-mono: 'Space Mono', monospace;
  --font-sans: 'Inter', sans-serif;
  --font-marker: 'Permanent Marker', cursive;
}

* {
  box-sizing: border-box;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

body {
  font-family: var(--font-sans);
  background-color: #050506;
  color: var(--white-chalk);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 10px;
}

/* CADRE MOBILE SMARTPHONE */
#game-container {
  width: 100%;
  max-width: 390px;
  height: min(94vh, 720px);
  background-color: var(--bg-asphalt);
  border: 1px solid #222228;
  border-radius: 28px;
  padding: 14px 16px 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.9);
  position: relative;
  overflow: hidden;
}

/* ÉCRAN ONBOARDING : STICKER HELLO MY NAME IS */
#onboarding-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-asphalt);
  z-index: 600;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#onboarding-screen.hidden { display: none !important; }

.onboarding-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sticker-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hello-sticker {
  width: 100%;
  background: #f7f6f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.75);
  border: 3px solid #e63926;
  transform: rotate(-1.5deg);
}

.sticker-header {
  background: #e63926;
  color: #ffffff;
  text-align: center;
  padding: 12px 10px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sticker-hello {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 2.35rem;
  line-height: 0.95;
  letter-spacing: 3px;
}

.sticker-sub {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 2.5px;
  margin-top: 4px;
}

.sticker-body {
  padding: 26px 14px;
  background: #f7f6f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sticker-input {
  width: 100%;
  border: none;
  border-bottom: 2px dashed #bdbcb2;
  background: transparent;
  font-family: var(--font-marker);
  font-size: 2rem;
  color: #141416;
  text-align: center;
  text-transform: uppercase;
  outline: none;
  padding: 4px 2px;
  user-select: text;
  -webkit-user-select: text;
}

.sticker-input::placeholder {
  color: #b4b3a8;
  font-size: 1.45rem;
}

.sticker-footer {
  height: 16px;
  background: #e63926;
}

.blaze-error {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--red-alert);
  margin: 0;
  text-align: center;
}

.onboarding-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.onboarding-hint {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-align: center;
  margin: 0;
  line-height: 1.4;
}

/* ÉCRAN D'ACCUEIL BLACK BOOK */
#home-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-asphalt);
  z-index: 300;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#home-screen.hidden { display: none !important; }

.home-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dymo-icon-btn {
  background: #1e1e24;
  border: 1px solid var(--card-border);
  color: var(--white-chalk);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.9rem;
  cursor: pointer;
}

.dymo-icon-btn:active { background: #2a2a32; }

.tag-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--yellow-bombing);
  border: 1px solid var(--yellow-bombing);
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.game-title {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  line-height: 0.9;
  margin: 0;
  letter-spacing: -1.5px;
  text-transform: uppercase;
}

.game-title .highlight {
  color: var(--yellow-bombing);
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.8);
}

.game-subtitle {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 8px;
}

.home-stats-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rank-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-icon { font-size: 2rem; }

.rank-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--white-chalk);
}

.rank-xp {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--yellow-bombing);
}

.home-divider {
  height: 1px;
  background: var(--card-border);
}

.home-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.quick-act-btn {
  background: #25252d;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 8px;
  color: var(--white-chalk);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  outline: none;
}

.quick-act-btn:active {
  background: #30303a;
  border-color: var(--yellow-bombing);
}

.main-cta {
  padding: 16px;
  font-size: 0.85rem;
}

.full-width { width: 100%; }

/* ==========================================
   HEADER MINIMALISTE REIGNS (GLYPHES + FLASH JAUNE / CYAN)
   ========================================== */
#stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 2px 2px 0 2px;
  flex-shrink: 0;
}

.stat-glyph-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
}

.impact-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  background: transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Bonus léger : point Jaune Bombing */
.impact-dot.pos-small {
  background: var(--yellow-bombing);
  border-color: var(--yellow-bombing);
  transform: scale(0.85);
}

/* Gros bonus : grand point Jaune Bombing lumineux */
.impact-dot.pos-large {
  background: var(--yellow-bombing);
  border-color: var(--yellow-bombing);
  box-shadow: 0 0 8px rgba(255, 230, 0, 0.75);
  transform: scale(1.25);
}

/* Malus léger : anneau Cyan Spray */
.impact-dot.neg-small {
  background: transparent;
  border-color: var(--cyan-spray);
  transform: scale(0.95);
}

/* Gros malus : grand point Cyan Spray */
.impact-dot.neg-large {
  background: var(--cyan-spray);
  border-color: var(--cyan-spray);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
  transform: scale(1.25);
}

.glyph-meter {
  position: relative;
  width: 24px;
  height: 30px;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.25s ease;
}

.glyph-bg,
.glyph-fg {
  width: 24px;
  height: 30px;
  display: block;
}

.glyph-bg path,
.glyph-bg rect {
  fill: #26262e;
}

.glyph-fill-mask {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  overflow: hidden;
  transition: height 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: flex-end;
}

.glyph-fg {
  flex-shrink: 0;
}

.glyph-fg path,
.glyph-fg rect {
  fill: var(--white-chalk);
  transition: fill 0.25s ease;
}

/* État critique permanent */
.stat-glyph-box.danger .glyph-fg path,
.stat-glyph-box.danger .glyph-fg rect {
  fill: var(--red-alert);
}

/* Flash après choix : hausse = Jaune Bombing */
.stat-glyph-box.delta-pos .glyph-meter {
  transform: scale(1.16);
  filter: drop-shadow(0 0 6px rgba(255, 230, 0, 0.65));
}

.stat-glyph-box.delta-pos .glyph-fg path,
.stat-glyph-box.delta-pos .glyph-fg rect {
  fill: var(--yellow-bombing) !important;
}

/* Flash après choix : baisse = Cyan Spray */
.stat-glyph-box.delta-neg .glyph-meter {
  transform: scale(0.92);
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.65));
}

.stat-glyph-box.delta-neg .glyph-fg path,
.stat-glyph-box.delta-neg .glyph-fg rect {
  fill: var(--cyan-spray) !important;
}

.glyph-label {
  font-family: var(--font-mono);
  font-size: 0.46rem;
  letter-spacing: 0.3px;
  color: var(--text-dim);
  white-space: nowrap;
  transition: color 0.25s ease;
}

.stat-glyph-box.delta-pos .glyph-label {
  color: var(--yellow-bombing);
}

.stat-glyph-box.delta-neg .glyph-label {
  color: var(--cyan-spray);
}

/* ==========================================
   TEXTE DE SITUATION (ESPACE DÉTENDU EN HAUT)
   ========================================== */
#narrative-box {
  flex: 1;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 8px;
}

#card-text {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.48;
  color: var(--white-chalk);
  margin: 0;
}

/* ==========================================
   CARTE STRICTEMENT CARRÉE 1:1 PLEINE LARGEUR
   ========================================== */
#card-wrapper {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  perspective: 1000px;
  margin-bottom: 4px;
}

#card {
  position: relative;
  width: 100%;
  max-width: 344px;
  aspect-ratio: 1 / 1;
  cursor: grab;
  z-index: 2;
  will-change: transform;
  touch-action: none;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#card:active { cursor: grabbing; }

.card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  backface-visibility: hidden;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.card-front {
  background: var(--card-bg);
  padding: 0;
  display: block;
  transform: rotateY(0deg);
}

.card-visual {
  width: 100%;
  height: 100%;
  display: block;
}

.card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* BANDEAU DE CHOIX EN SURIMPRESSION SUR LA CARTE (FONDU PROGRESSIF) */
#stencil-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 14px 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.25;
  pointer-events: none;
  z-index: 15;
  background: rgba(13, 13, 16, 0.88);
  color: var(--white-chalk);
  backdrop-filter: blur(4px);
  transition: opacity 0.08s linear;
}

#stencil-preview.left {
  text-align: left;
  padding-left: 16px;
  border-bottom: 2px solid var(--cyan-spray);
}

#stencil-preview.right {
  text-align: right;
  padding-right: 16px;
  border-bottom: 2px solid var(--yellow-bombing);
}

.hidden { display: none !important; }

/* LIGNE LÉGENDE + CHEVRONS DE SWIPE ÉLÉGANTS */
.speaker-row {
  width: 100%;
  max-width: 344px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
}

.swipe-chevron {
  background: none;
  border: none;
  padding: 4px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b4b56;
  transition: color 0.18s ease, transform 0.18s ease;
}

.swipe-chevron svg {
  width: 14px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.swipe-chevron.left {
  animation: nudgeLeft 2.8s ease-in-out infinite;
}

.swipe-chevron.right {
  animation: nudgeRight 2.8s ease-in-out infinite;
}

.swipe-chevron.left.active {
  color: var(--cyan-spray);
  transform: translateX(-3px) scale(1.15);
  animation: none;
}

.swipe-chevron.right.active {
  color: var(--yellow-bombing);
  transform: translateX(3px) scale(1.15);
  animation: none;
}

@keyframes nudgeLeft {
  0%, 100% { transform: translateX(0); opacity: 0.45; }
  50% { transform: translateX(-3px); opacity: 0.95; }
}

@keyframes nudgeRight {
  0%, 100% { transform: translateX(0); opacity: 0.45; }
  50% { transform: translateX(3px); opacity: 0.95; }
}

.card-speaker {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.1;
  min-height: 16px;
}

.card-speaker.has-character {
  color: var(--white-chalk);
}

/* ==========================================
   LIGNE DE STATUT BAS D'ÉCRAN (STYLE REIGNS)
   ========================================== */
#run-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 6px 4px 6px;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.day-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--white-chalk);
}

.best-run-label {
  font-size: 0.68rem;
  color: var(--text-dim);
}

/* DICO CONTEXTUEL SUR LES CARTES */
.dico-word {
  color: var(--yellow-bombing);
  border-bottom: 1px dashed var(--yellow-bombing);
  cursor: pointer;
  padding: 0 2px;
}

.dico-tooltip {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 94%;
  background: #111115;
  border: 1.5px solid var(--yellow-bombing);
  border-radius: 12px;
  padding: 10px 12px;
  z-index: 30;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.94);
  text-align: left;
}

.dico-tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

#dico-tooltip-term {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--yellow-bombing);
  text-transform: uppercase;
}

.dico-close-mini {
  background: #1e1e24;
  border: 1px solid var(--card-border);
  color: var(--white-chalk);
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}

#dico-tooltip-def {
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--white-chalk);
  margin: 0;
}

/* VERSO DE CARTE */
.card-back {
  background: #111115;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 1px solid rgba(255, 230, 0, 0.3);
  overflow: hidden;
  position: relative;
}

.back-pattern-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(rgba(255, 230, 0, 0.15) 15%, transparent 16%),
                    radial-gradient(rgba(255, 255, 255, 0.05) 15%, transparent 16%);
  background-size: 24px 24px;
  background-position: 0 0, 12px 12px;
  opacity: 0.8;
}

.back-logo-stencil {
  position: relative;
  z-index: 2;
  border: 2px solid var(--yellow-bombing);
  padding: 12px 20px;
  border-radius: 12px;
  background: rgba(15, 15, 17, 0.9);
  box-shadow: 0 0 20px rgba(255, 230, 0, 0.15);
  transform: rotate(-3deg);
}

.back-brand {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--yellow-bombing);
  letter-spacing: 2px;
}

#card.flipped {
  transform: rotateY(180deg) !important;
}

/* BOUTONS MODALES */
.dymo-btn {
  padding: 12px 8px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: transform 0.1s;
}

.dymo-btn:active { transform: scale(0.96); }

.dymo-btn.left {
  background-color: rgba(255, 59, 48, 0.12);
  color: var(--red-alert);
  border: 1px solid rgba(255, 59, 48, 0.4);
}

.dymo-btn.right {
  background-color: rgba(48, 209, 88, 0.12);
  color: var(--green-chrome);
  border: 1px solid rgba(48, 209, 88, 0.4);
}

/* DOCK LOWER */
#dock {
  display: flex;
  justify-content: space-around;
  background: #141418;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid #202026;
  flex-shrink: 0;
}

.dock-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  cursor: pointer;
  padding: 5px 4px;
  border-radius: 8px;
  flex: 1;
}

.dock-btn.active {
  color: var(--yellow-bombing);
  background: #1e1e25;
}

.dock-icon { font-size: 0.85rem; }

/* MODALES */
.modal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 12, 0.96);
  backdrop-filter: blur(10px);
  z-index: 400;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.modal.sub-modal {
  z-index: 500;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #222228;
  padding-bottom: 12px;
  flex-shrink: 0;
}

.modal-header h2 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--yellow-bombing);
  margin: 0;
}

.close-btn {
  background: #1e1e24;
  border: 1px solid var(--card-border);
  color: var(--white-chalk);
  font-size: 1rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.codex-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
}

.codex-mode-btn {
  background: #151519;
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 8px 4px;
  border-radius: 8px;
  cursor: pointer;
}

.codex-mode-btn.active {
  background: rgba(255, 230, 0, 0.12);
  color: var(--yellow-bombing);
  border-color: var(--yellow-bombing);
}

.codex-subview {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 10px 0;
}

.filter-btn {
  background: #18181c;
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  padding: 6px 2px;
  border-radius: 6px;
  cursor: pointer;
}

.filter-btn.active {
  background: #25252d;
  color: var(--yellow-bombing);
  border-color: var(--yellow-bombing);
}

#codex-modal .modal-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* GRILLE POKÉDEX #001–050 SANS ÉTIREMENT VERTICAL */
.grid-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 2px;
  padding-bottom: 8px;
}

.artist-card {
  background: #151519;
  border: 1px solid #26262e;
  border-radius: 10px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  opacity: 0.45;
  cursor: not-allowed;
  min-width: 0;
}

.artist-card.unlocked {
  opacity: 1;
  background: #18181c;
  border-color: var(--yellow-bombing);
  cursor: pointer;
}

.artist-card.unlocked:active {
  transform: scale(0.95);
}

.artist-dex {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  color: var(--text-dim);
  align-self: flex-start;
}

.artist-card.unlocked .artist-dex {
  color: var(--yellow-bombing);
}

.artist-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.artist-avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #3f3f4a;
  background: #111115;
  border: 1px dashed #282832;
  border-radius: 6px;
}

.artist-name {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  color: var(--text-dim);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.artist-card.unlocked .artist-name {
  color: var(--white-chalk);
}

.glossary-search-input {
  width: 100%;
  background: #18181c;
  border: 1px solid var(--card-border);
  color: var(--white-chalk);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  padding: 8px 10px;
  border-radius: 8px;
  margin: 10px 0;
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}

.glossary-search-input:focus {
  border-color: var(--yellow-bombing);
}

.glossary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 2px;
}

.glossary-item {
  background: #18181c;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 12px;
}

.glossary-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.glossary-term {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--yellow-bombing);
}

.glossary-cat {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  color: var(--text-dim);
  background: #23232a;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.glossary-def {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--white-chalk);
  margin: 0;
}

/* FICHE ARTISTE : ŒUVRE EN GRAND FORMAT CARRÉ PLEINE LARGEUR */
#artist-detail-modal .modal-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-top: 12px;
}

.artist-detail-card {
  background: #151518;
  border: 1px solid var(--yellow-bombing);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(255, 230, 0, 0.1);
}

.detail-icon {
  width: 100%;
  font-size: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.artist-detail-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  display: block;
}

.rarity-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--yellow-bombing);
  border: 1px solid var(--yellow-bombing);
  background: rgba(255, 230, 0, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
}

.detail-bio {
  font-size: 0.82rem;
  line-height: 1.42;
  color: var(--white-chalk);
  margin: 0;
  text-align: center;
}

.detail-footer {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  border-top: 1px solid var(--card-border);
  padding-top: 8px;
  width: 100%;
  text-align: center;
}

/* ==========================================
   STATISTIQUES DE CARRIÈRE & FINS DÉBLOQUÉES
   ========================================== */
.stats-scroll-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 2px;
}

.career-stats-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}

.c-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #18181c;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  font-size: 0.78rem;
}

.c-stat-row strong {
  font-family: var(--font-mono);
  color: var(--yellow-bombing);
  font-size: 0.82rem;
}

.progress-bar-track {
  width: 100%;
  height: 6px;
  background: #18181c;
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.progress-bar-fill {
  height: 100%;
  background: var(--yellow-bombing);
  transition: width 0.35s ease;
}

.endings-section {
  margin-top: 14px;
}

.endings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.endings-header strong {
  color: var(--yellow-bombing);
}

.endings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.ending-badge {
  background: #141418;
  border: 1px solid #24242c;
  border-radius: 8px;
  padding: 7px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0.45;
}

.ending-badge.unlocked {
  opacity: 1;
  background: #1a1a20;
  border-color: rgba(255, 230, 0, 0.45);
}

.ending-code {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  color: var(--text-dim);
}

.ending-badge.unlocked .ending-code {
  color: var(--cyan-spray);
}

.ending-title {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-dim);
}

.ending-badge.unlocked .ending-title {
  color: var(--white-chalk);
}

/* CLASSEMENTS */
.lb-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}

.lb-tab-btn {
  background: #18181c;
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 8px 4px;
  border-radius: 8px;
  cursor: pointer;
}

.lb-tab-btn.active {
  background: #25252d;
  color: var(--yellow-bombing);
  border-color: var(--yellow-bombing);
}

.leaderboard-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
}

.lb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #18181c;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border: 1px solid var(--card-border);
}

.lb-row.player {
  border-color: var(--yellow-bombing);
  background: #222218;
}

/* PARAMÈTRES & CRÉDITS */
.settings-scroll-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.setting-divider {
  height: 1px;
  background: var(--card-border);
  margin: 4px 0;
}

.credits-box {
  background: #151519;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.credits-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--yellow-bombing);
  margin: 0;
  letter-spacing: 1px;
}

.credits-line {
  font-size: 0.74rem;
  line-height: 1.42;
  color: var(--white-chalk);
  margin: 0;
}

.credits-note {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  margin: 2px 0 0 0;
}

.danger-btn {
  background: rgba(255, 59, 48, 0.15) !important;
  color: var(--red-alert) !important;
  border: 1px solid var(--red-alert) !important;
}

/* FIN DE RUN */
.death-step { width: 100%; height: 100%; display: flex; flex-direction: column; }

.alias-badge {
  font-family: var(--font-mono);
  color: var(--yellow-bombing);
  font-weight: 700;
  font-size: 1rem;
  margin-top: 10px;
}

.death-text {
  font-size: 0.9rem;
  margin: 16px 0;
  line-height: 1.4;
}

.run-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.run-stat-card {
  background: #18181c;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--yellow-bombing);
}

.stat-lbl {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.record-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--yellow-bombing);
  background: rgba(255, 230, 0, 0.12);
  border: 1px dashed var(--yellow-bombing);
  padding: 8px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.xp-gain {
  font-family: var(--font-mono);
  color: var(--green-chrome);
  font-weight: 700;
  margin-bottom: 20px;
}

.releve-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 24px;
  padding: 20px 0;
}

.black-book-cover {
  width: 100%;
  background: #151518;
  border: 2px solid var(--yellow-bombing);
  border-radius: 16px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(255, 230, 0, 0.15);
}

.bb-icon { font-size: 3rem; display: block; margin-bottom: 12px; }

.releve-title {
  font-family: var(--font-mono);
  color: var(--white-chalk);
  font-size: 0.95rem;
  margin: 0;
  letter-spacing: 1px;
}

.releve-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 6px 0 20px 0;
}

.blaze-stamped {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--yellow-bombing);
  border: 2px dashed var(--yellow-bombing);
  padding: 8px 16px;
  border-radius: 8px;
  display: inline-block;
  background: rgba(255, 230, 0, 0.08);
  transform: rotate(-2deg);
}

.home-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}