/* ===================================================
   KURO ARCANA — Le Repaire (classes .rp-* uniquement ; panneaux : calque .mj-calque de l'Arcade)
   Mobile d'abord : grille 6 × 8 au pouce (cases ≥ 44 px), texte ≥ 16 px.
   =================================================== */

.rp { max-width: 560px; margin: 0 auto; }
.rp-niveau { font-size: 0.9em; color: var(--or-lumineux); }

.rp-production {
  position: relative;
  display: grid;
  gap: 8px;
  justify-items: center;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(232, 176, 75, 0.45);
  border-radius: 14px;
  background: rgba(10, 5, 5, 0.75);
  font-family: 'Poppins', sans-serif;
  color: #fff;
}

.rp-stock { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 0; }
.rp-stock strong { color: var(--or-dore); }
.rp-collecter { min-width: 180px; min-height: 48px; }
.rp-collecter:disabled { opacity: 0.55; cursor: default; }
.rp-envolee { position: absolute; top: 40%; font-weight: 700; color: var(--or-dore); pointer-events: none; }

.rp-texte, .rp-message, .rp-consigne {
  margin: 0;
  font-family: 'Raleway', sans-serif;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
}

.rp-message { margin-bottom: 12px; color: var(--or-lumineux); }
.rp-consigne { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; color: #fff; }

/* ---------- GRILLE (vue de dessus) ---------- */
.rp-grille {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(8, minmax(48px, 1fr));
  gap: 4px;
  aspect-ratio: 6 / 8;
  margin: 0 auto 18px;
  padding: 8px;
  border: 1px solid rgba(232, 176, 75, 0.5);
  border-radius: 16px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 100%),
    radial-gradient(circle at 50% 50%, rgba(46, 90, 50, 0.45), rgba(15, 25, 15, 0.95));
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
}

.rp-case {
  min-width: 0;
  padding: 0;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
}

.rp-decor { border-style: solid; border-color: transparent; }
.rp-decor:disabled { cursor: default; }
.rp-case-cible { border-color: rgba(255, 215, 0, 0.55); background: rgba(255, 215, 0, 0.08); }
.rp-case:focus-visible, .rp-batiment:focus-visible { outline: 2px solid var(--or-dore); outline-offset: 1px; }

.rp-batiment {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  padding: 4px;
  border: 1px solid rgba(232, 176, 75, 0.7);
  border-radius: 12px;
  background: radial-gradient(circle at 50% 35%, rgba(232, 176, 75, 0.28), transparent 70%), linear-gradient(160deg, #2a1410, #120808);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.55);
  color: #fff;
  font-family: 'Cinzel', serif;
  text-align: center;
  cursor: pointer;
}

.rp-batiment:disabled { cursor: default; }
.rp-bat-hall { border-color: var(--or-dore); box-shadow: 0 0 18px var(--glow-or); }
.rp-bat-icone { font-size: 2rem; line-height: 1; }
.rp-bat-nom { font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; }
.rp-bat-niveau { font-family: 'Poppins', sans-serif; color: var(--or-lumineux); }

/* ---------- SALLE D'EXPOSITION ---------- */
.rp-section { margin-bottom: 16px; }
.rp-titre { margin: 0 0 10px; font-family: 'Cinzel', serif; color: var(--or-dore); text-align: center; }

.rp-vitrine, .rp-choix-cartes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  justify-items: center;
}

.rp-choix-cartes { max-height: 55vh; overflow-y: auto; padding: 4px; }

.rp-vitrine-carte, .rp-vitrine-vide {
  width: 100%;
  max-width: 120px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.rp-vitrine-vide {
  aspect-ratio: 5 / 7;
  border: 1px dashed rgba(232, 176, 75, 0.6);
  border-radius: 10px;
  color: var(--or-dore);
  font-size: 1.8rem;
}

/* ---------- ACTIONS ET LISTES ---------- */
.rp-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin-bottom: 14px; }
.rp-actions .mj-btn { min-height: 48px; }

.rp-liste { display: grid; gap: 8px; margin-bottom: 12px; max-height: 45vh; overflow-y: auto; }

.rp-objet {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid rgba(232, 176, 75, 0.45);
  border-radius: 10px;
  background: rgba(20, 10, 8, 0.85);
  color: #fff;
  font: 1rem 'Poppins', sans-serif;
  text-align: left;
  cursor: pointer;
}

.rp-objet strong { margin-left: auto; color: var(--or-dore); }
.rp-objet em { color: #e05a6b; font-style: normal; }
.rp-objet:disabled { opacity: 0.5; cursor: default; }
.rp-effet strong { color: var(--or-dore); }
.rp-raison { color: #ff9a9a; }

@media (max-width: 768px) {
  .rp-texte, .rp-message, .rp-consigne, .rp-production, .rp-bat-niveau, .rp-titre, .rp-niveau { font-size: 1rem; }
  .rp-bat-nom { font-size: 1rem; }
  .rp-bat-icone { font-size: 1.6rem; }
  .rp-grille { padding: 6px; gap: 3px; }
}
