/* [50-research-detail] Bibliothèque : colonne du bibliothécaire et vue détail d'une recherche, d'après l'original */
.research-tree-layout { align-items: stretch; }
.research-side {
  flex: 0 0 150px;
  min-height: 476px;
  padding: 8px;
  background: linear-gradient(180deg, rgba(17, 13, 7, 0.9), rgba(7, 5, 3, 0.95)), #100c07;
  border: 1px solid #433523;
}
.research-bubble {
  padding: 10px 12px;
  background: rgba(235, 232, 226, 0.88);
  color: #222528;
  border-radius: 3px;
  font-size: 12.5px;
  line-height: 1.35;
}
.research-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Vue détail */
.research-detail-panel { gap: 8px; min-height: 476px; }
.rd-head { display: flex; align-items: center; gap: 0; border: 2px solid var(--gold-bronze); background: #111213; height: 44px; position: relative; }
.rd-return { align-self: stretch; margin: 5px 8px; padding: 0 16px; border: 1px solid #f3b3ac; border-radius: 2px; background: linear-gradient(180deg, #d44838 0%, #aa3023 50%, #791f15 100%); color: #fff; font-weight: 700; font-size: 12px; cursor: pointer; }
.rd-head h3 { flex: 1; margin: 0; text-align: center; color: #fff; font-family: 'Josefin Sans', sans-serif; font-size: 20px; font-weight: 400; text-transform: uppercase; }
.rd-level { width: 46px; height: 46px; margin: -6px 4px -6px 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 40% 35%, #444, #111); border: 3px solid #d8d8d8; color: #fff; font-size: 22px; font-weight: 700; }
.rd-body { display: flex; border: 2px solid var(--gold-bronze); background: #000; }
.rd-body .research-art-frame { flex: none; width: 350px; height: 114px; margin: 0; border: none; border-radius: 0; align-self: auto; }
.rd-body .research-desc-box { flex: 1; min-height: 114px; padding: 10px 12px; background: #171819; color: #fff; font-size: 12.5px; line-height: 1.4; }
.research-detail-panel .research-cost-table { background: rgba(60, 60, 60, 0.55); border: 2px solid #8a8070; }
.research-detail-panel .research-cost-table th { background: none; color: #fff; font-weight: 400; font-size: 12px; text-align: left; border: none; }
.research-detail-panel .research-cost-table td { color: #fff; font-size: 12px; }
.research-detail-panel .research-cost-table tbody tr:nth-child(odd) { background: rgba(255, 255, 255, 0.08); }
.rd-ico { display: inline-block; width: 22px; color: #cda775; }
.rd-check { color: #d1a46a; font-weight: 900; }
.rd-foot { display: flex; justify-content: space-between; align-items: center; padding: 0 56px; color: #fff; font-size: 14px; }
.research-detail-panel .research-buttons-col { flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 8px 40px; margin-top: 0; }
.research-detail-panel .research-buttons-col .btn-big-red-build,
.research-detail-panel .research-buttons-col .btn-big-yellow-instant { flex: 1 1 40%; width: auto; padding: 9px 8px; font-size: 13px; }
.research-detail-panel .research-buttons-col .btn-big-grey-instant { flex: 1 1 100%; }
.btn-big-yellow-instant { border: 1px solid var(--gold-highlight); border-radius: 6px; background: linear-gradient(180deg, #e3bb86 0%, #c2822e 50%, #a26c26 100%); color: #493111; font-family: 'Josefin Sans', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; cursor: pointer; }
.btn-big-yellow-instant:disabled { filter: grayscale(0.85) brightness(0.7); cursor: not-allowed; }
.btn-big-yellow-instant:hover:not(:disabled) { filter: brightness(1.1); }

/* ===== Mesures de l'original (capture 1377×1122, échelle 0,55 → fenêtre de 760 px) =====
   colonne gauche (rayonnages + bibliothécaire + bulle) ≈ 41 %, contenu à droite ≈ 447 px */
#building-modal .game-modal-box.modal-wide.modal-research { width: 760px; }
.modal-research .research-tree-layout { gap: 0; align-items: stretch; }
.modal-research .research-side {
  flex: 1; min-width: 0; min-height: 0; position: relative; padding: 0;
  border: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.55)),
    repeating-linear-gradient(90deg, #40311e 0 7px, #271d11 7px 10px, #4e3d27 10px 15px, #322718 15px 19px, #5d4a30 19px 22px, #21190f 22px 26px),
    #241b10;
  border-right: 2px solid var(--gold-bronze);
}
.modal-research .research-bubble { position: absolute; top: 14px; left: 12px; width: 190px; font-size: 11.5px; padding: 8px 10px; }
.modal-research .research-main { flex: 0 0 447px; width: 447px; padding: 6px 0 0 8px; box-sizing: border-box; }

/* arbre réduit à la largeur du contenu (542 → 440 px) ; les cartes restent cliquables */
.modal-research .research-tree-board { transform: scale(0.81); transform-origin: top left; margin-bottom: -90px; }

/* fiche : mêmes proportions que l'original */
.modal-research .research-detail-panel { min-height: 0; gap: 6px; }
.modal-research .rd-head { height: 39px; }
.modal-research .rd-return { margin: 4px 6px; padding: 0 12px; font-size: 11px; }
.modal-research .rd-head h3 { font-size: 17px; }
.modal-research .rd-level { width: 40px; height: 40px; font-size: 18px; }
.modal-research .rd-body { height: 196px; }
.modal-research .rd-body .research-art-frame { width: 254px; height: 100%; position: relative; background: none; overflow: hidden; }
.rd-art-bg, .rd-art-band { position: absolute; background-image: none; background-repeat: no-repeat; }
.rd-art-bg { inset: -10px; margin: 0; filter: blur(8px) brightness(0.55); }
.rd-art-band { left: 0; right: 0; top: 50%; height: 83px; margin-top: -41px; }
.modal-research .rd-body .research-desc-box { flex: 1; min-height: 0; padding: 8px 8px; font-size: 11px; }
.modal-research .research-detail-panel .research-cost-table th,
.modal-research .research-detail-panel .research-cost-table td { padding: 2px 5px; font-size: 11px; }
.modal-research .rd-foot { padding: 0 40px; font-size: 12px; }
.modal-research .research-detail-panel .research-buttons-col { gap: 6px 14px; }
.modal-research .research-detail-panel .research-buttons-col .btn-big-red-build,
.modal-research .research-detail-panel .research-buttons-col .btn-big-yellow-instant { padding: 7px 6px; font-size: 11px; }

/* Couleurs des boutons de l'original : rouge-orangé (RETOUR, RECHERCHER), jaune vif (RECHERCHER MAINTENANT), jamais ternes */
.research-detail-panel .rd-return,
.research-detail-panel .btn-big-red-build { background: linear-gradient(180deg, #d79d52 0%, #c63828 50%, #8f2418 100%); border: 1px solid #e6c293; }
.research-detail-panel .btn-big-red-build:disabled,
.research-detail-panel .btn-big-yellow-instant:disabled { filter: grayscale(0.35) brightness(0.8); }

/* la fenêtre est de hauteur fixe : colonne gauche et contenu occupent toute la hauteur, boutons en bas comme l'original */
.modal-research .research-tree-layout { min-height: 500px; }
.modal-research .research-main { display: flex; flex-direction: column; }
.modal-research .research-detail-panel { flex: 1; }
.modal-research .research-detail-panel .research-buttons-col { margin-top: auto; }

/* illustration réduite (la source est minuscule) : plus de place pour le texte */
.modal-research .rd-body { height: 110px; }
.modal-research .rd-body .research-art-frame { width: 190px; height: auto; align-self: center; margin: 0 0 0 0; background: #000; }
.modal-research .rd-body .research-art-frame .rd-art-band { position: relative; margin: 0; top: auto; left: 0; right: 0; height: 62px; }
.modal-research .rd-body .research-desc-box { font-size: 12.5px; padding: 10px 12px; line-height: 1.4; }
.modal-research .research-detail-panel .research-cost-table td { padding: 5px 6px; }
.modal-research .research-detail-panel .research-cost-table th { padding: 4px 6px; }

/* Vue arbre : comme avant, l'arbre en taille réelle, sans colonne du bibliothécaire */
.modal-research .research-tree-layout.is-tree .research-side { display: none; }
.modal-research .research-tree-layout.is-tree .research-main { flex: 0 0 542px; width: 542px; margin: 0 auto; padding: 0; }
.modal-research .research-tree-layout.is-tree .research-tree-board { transform: none; margin-bottom: 0; }

/* Durée et diamants centrés au-dessus du bouton correspondant */
.rd-actions { display: flex; gap: 14px; margin-top: auto; }
.rd-act { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.rd-info { text-align: center; color: #fff; font-size: 14px; }
.rd-act .btn-big-red-build, .rd-act .btn-big-yellow-instant { width: 100%; padding: 8px 6px; font-size: 11.5px; }
