/* ============================================
   DUAL EMPIRES - Journal des actions du combat (js/journal-combat.js)
   ============================================
   Alpha 0.1.3, chantier C6. Bouton discret dans la barre de l'adversaire,
   panneau latéral fermé par défaut, sous les fenêtres de décision (réaction,
   paiement…) pour ne jamais les masquer. Couleurs provisoires de la charte. */

.btn-journal-combat {
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: inherit;
  color: #f3ead6;
  background: rgba(14, 16, 24, 0.75);
  border: 1px solid rgba(201, 162, 75, 0.7);
  border-radius: 6px;
  cursor: pointer;
}

.btn-journal-combat:hover,
.btn-journal-combat[aria-expanded="true"] {
  border-color: #e8c87a;
  box-shadow: 0 0 6px rgba(59, 111, 216, 0.55);
}

.journal-combat-panneau {
  position: fixed;
  top: 64px;
  right: 12px;
  z-index: 90;
  width: min(380px, 92vw);
  max-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  background: rgba(10, 12, 20, 0.94);
  border: 1px solid rgba(201, 162, 75, 0.7);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
  color: #f3ead6;
}

.journal-combat-panneau[hidden] {
  display: none;
}

.journal-entete {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(201, 162, 75, 0.45);
  color: #e8c87a;
  font-weight: 700;
}

/* Lot E7-B : rythme de présentation des actions de l'IA */
.journal-rythme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  border-bottom: 1px solid rgba(201, 162, 75, 0.25);
  color: #f3ead6;
  font-size: 0.82rem;
}

.journal-rythme select {
  padding: 2px 6px;
  border: 1px solid rgba(201, 162, 75, 0.6);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.45);
  color: #f3ead6;
}

.journal-fermer {
  border: none;
  background: none;
  color: #f3ead6;
  font-size: 1rem;
  cursor: pointer;
}

.journal-liste {
  list-style: none;
  margin: 0;
  padding: 6px 10px 10px;
  overflow-y: auto;
  font-size: 0.82rem;
  line-height: 1.35;
}

.journal-separateur {
  margin: 8px 0 4px;
  padding: 2px 6px;
  border-left: 3px solid #c9a24b;
  color: #e8c87a;
  font-weight: 700;
}

.journal-separateur.journal-adversaire {
  border-left-color: #b84a4a;
}

.journal-ligne {
  display: flex;
  gap: 6px;
  padding: 3px 0;
  border-bottom: 1px dashed rgba(201, 162, 75, 0.15);
  white-space: pre-line;
}

.journal-phase {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 0 5px;
  border-radius: 3px;
  background: rgba(59, 111, 216, 0.3);
  font-size: 0.72rem;
}

/* ----- Finalisation du peaufinage : cartes citées, consultables d'un clic (js/journal-cartes.js) ----- */
.journal-texte {
  min-width: 0;
}

.journal-carte {
  padding: 0;
  border: none;
  border-bottom: 1px dotted rgba(232, 200, 122, 0.8);
  background: none;
  color: #e8c87a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.journal-carte:hover,
.journal-carte:focus-visible {
  color: #fff3d6;
  border-bottom-style: solid;
  outline: none;
  text-shadow: 0 0 8px rgba(59, 111, 216, 0.8);
}

/* Fiche de la carte : à gauche du journal, même cadre que lui */
.journal-carte-fiche {
  position: fixed;
  top: 64px;
  right: calc(12px + min(380px, 92vw) + 10px);
  z-index: 91;
  width: min(290px, 78vw);
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  background: rgba(10, 12, 20, 0.96);
  border: 1px solid rgba(201, 162, 75, 0.7);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
  color: #f3ead6;
}

.journal-carte-fiche[hidden] {
  display: none;
}

.journal-carte-visuel {
  position: relative;
  width: min(230px, 62vw);
  aspect-ratio: 2 / 3;
  margin: 10px auto 6px;
}

.journal-carte-visuel[hidden] {
  display: none;
}

/* Visuel classique : image entière dans le cadre (une Troupe refondue apporte son propre cadre, css/carte-troupe.css) */
.journal-carte-visuel > img {
  position: static;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 1;
}

.journal-carte-type,
.journal-carte-effet,
.journal-carte-note {
  margin: 0;
  padding: 4px 12px;
  font-size: 0.84rem;
  line-height: 1.4;
}

.journal-carte-type {
  color: #e8c87a;
  font-weight: 700;
}

.journal-carte-effet {
  white-space: pre-line;
}

.journal-carte-note {
  padding-bottom: 10px;
  font-size: 0.74rem;
  font-style: italic;
  opacity: 0.75;
}

/* Fenêtre étroite : la fiche passe par-dessus le journal */
@media (max-width: 760px) {
  .journal-carte-fiche {
    right: 12px;
    z-index: 92;
  }
}

.journal-vide {
  opacity: 0.75;
  font-style: italic;
}
