/* [99-council] Salle du Conseil : trois sièges par page, bulle de bonus, bonus total, grille des conseillers ; décor dessiné (council/wall.svg, council/chair.svg) */
.council-window { position: relative; width: min(720px, 98%); max-height: 98%; display: flex; flex-direction: column; padding-top: 0; }
/* Titre en couronne : dans le flux (Lucky Chance), posé sur la salle du Conseil (par-dessus le mur) */
.council-crown { position: relative; display: flex; justify-content: center; height: 52px; }
.council-window .council-crown { position: absolute; top: 0; left: 0; right: 0; z-index: 6; pointer-events: none; }
.council-window .council-crown > * { pointer-events: auto; }

/* Salle : mur, trois fauteuils, table */
.council-room {
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 980 / 476;
  margin: 0;
  background: url("../assets/images/council/wall.svg") center top / 100% 100% no-repeat, #14191a;
  overflow: hidden;
}
.council-room::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 28.15%;
  /* plateau de table en noyer, chant laiton */
  background:
    linear-gradient(180deg, #e2c48f 0, #b98b4e 3px, #5a3d1f 5px, transparent 6px),
    repeating-linear-gradient(92deg, rgba(0, 0, 0, 0) 0 34px, rgba(0, 0, 0, 0.12) 34px 36px, rgba(0, 0, 0, 0) 36px 71px),
    linear-gradient(180deg, #5b3820 6px, #3d2414 45%, #1d110a 100%);
  pointer-events: none;
}
.council-seats { position: relative; z-index: 1; height: 100%; }
/* centres des trois alcôves du mur (council/wall.svg) */
.council-seat:nth-child(1) { --cx: 23.1%; }
.council-seat:nth-child(2) { --cx: 51.4%; }
.council-seat:nth-child(3) { --cx: 80.2%; }
.council-seat { position: absolute; top: 0; bottom: 0; width: 30%; left: calc(var(--cx) - 15%); cursor: pointer; }
.council-seat-figure { position: absolute; left: 50%; bottom: 28.15%; transform: translateX(-50%); width: 95%; aspect-ratio: 247 / 230; }
.council-empty-chair { position: absolute; inset: auto 0 0 0; margin: auto; width: 100%; height: 100%; object-fit: contain; opacity: 0.95; }

.council-frame { position: absolute; z-index: 2; left: 50%; bottom: 23.5%; width: 68%; transform: translateX(-50%); aspect-ratio: 1; pointer-events: none; }
.council-frame.seated { bottom: 0; width: 100%; } /* buste assis : mi-corps, le bas touche la table (caché par la plaque) */
.council-portrait { display: block; width: 100%; height: 100%; object-fit: contain; object-position: bottom; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.7)); }
.council-lvl-badge { position: absolute; right: -2%; bottom: 7%; min-width: 28px; height: 22px; padding: 0 5px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; font: 700 12px 'Josefin Sans', sans-serif; color: var(--gold-light); background: #17120b; border: 1px solid var(--gold-classic); border-radius: 12px; }
.council-seat.focus .council-portrait, .council-seat.target .council-portrait { filter: drop-shadow(0 0 7px rgba(238, 215, 185, 0.95)) drop-shadow(0 3px 5px rgba(0, 0, 0, 0.7)); }
.council-seat.target .council-empty-chair { filter: drop-shadow(0 0 10px rgba(238, 215, 185, 0.85)); opacity: 1; }
/* plaque verte du poste */
.council-plate {
  position: absolute; left: 50%; bottom: 28.15%; transform: translateX(-50%); z-index: 3;
  container-type: inline-size; width: 70%; aspect-ratio: 179 / 35; box-sizing: border-box; padding: 0 6%; display: flex; align-items: center; justify-content: center;
  text-align: center; white-space: nowrap; font-family: 'Limelight', serif; font-size: clamp(8px, 1.2vw, 11px); letter-spacing: 0.2px; color: #ede3d7; text-shadow: 0 1px 3px #000;
  /* plaque hexagonale laiton, fond vert bouteille */
  background: linear-gradient(180deg, #2a7560, var(--deco-bottle) 60%, #143a2f);
  border-top: 2px solid var(--deco-brass-hi); border-bottom: 2px solid var(--deco-brass);
  clip-path: polygon(7% 0, 93% 0, 100% 50%, 93% 100%, 7% 100%, 0 50%);
}
.council-owned-card.jailed { border-color: #bf4133; }
.council-owned-card.jailed img { filter: sepia(1) saturate(7) hue-rotate(-42deg) brightness(0.85); }
.council-jail-tag { position: absolute; z-index: 4; top: -8px; left: 50%; transform: translateX(-50%); padding: 1px 8px; font-size: 11px; color: #fff; background: rgba(40, 56, 90, 0.92); border: 1px solid #6a82b0; white-space: nowrap; }

/* flèches laiton pour changer de page de postes */
.council-arrow { position: absolute; z-index: 3; top: 50%; width: 38px; height: 74px; margin-top: -37px; padding: 0; border: 0; background: none; cursor: pointer; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8)); }
.council-arrow::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #6e4f28, var(--deco-brass) 55%, var(--deco-brass-hi)); clip-path: polygon(0 0, 55% 0, 100% 50%, 55% 100%, 0 100%, 45% 50%); }
.council-arrow-next { right: 4px; }
.council-arrow-prev { left: 4px; transform: scaleX(-1); }
.council-arrow:disabled { opacity: 0.3; cursor: default; }

/* bulle de bonus du conseiller (en bas à gauche de la table) */
.council-tip { position: absolute; z-index: 4; top: 71.85%; width: 33%; min-width: 230px; transform: translateX(-50%); padding: 3px 10px 5px; background: rgba(0, 0, 0, 0.94); border-top: 2px solid #7a6448; color: var(--text-cream); font-size: 11px; box-sizing: border-box; }
.council-tip:empty { display: none; }
.council-tip-title { color: var(--deco-brass-hi); font-size: 11px; text-align: center; margin-bottom: 2px; }
.council-tip-bio { margin: 0 0 3px; font-style: italic; line-height: 1.3; text-align: center; color: #c5b5a0; }
.council-tip-row { display: flex; justify-content: space-between; gap: 10px; line-height: 1.3; }
.council-tip-row b { font-weight: 600; color: #fff; }
.council-tip-row.inactive { opacity: 0.45; text-decoration: line-through; }

/* actions sur le conseiller du poste choisi */
.council-actions { flex-shrink: 0; min-height: 34px; margin: 6px 12px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text-cream); font-size: 12.5px; }
.council-actions .council-who { margin-right: auto; font-family: 'Limelight', serif; color: var(--gold-light); }
.council-upgrade, .council-release, .council-dismiss { padding: 3px 12px; font-family: 'Josefin Sans', sans-serif; font-size: 12px; cursor: pointer; }
.council-upgrade { color: #150e05; background: linear-gradient(180deg, #e1c49e, #9d7847); border: 1px solid #4d3a21; }
.council-release { color: #fff; background: linear-gradient(180deg, #3a4a6a, #1c2438); border: 1px solid #6a82b0; }
.council-dismiss { color: #fff; background: linear-gradient(180deg, #6d271f, #42140e); border: 1px solid #a2564e; }
.council-upgrade:hover, .council-release:hover, .council-dismiss:hover { filter: brightness(1.12); }

/* bas : bonus total et grille des conseillers */
.council-bottom { flex: 1; min-height: 0; display: flex; gap: 10px; margin: 0; padding: 6px 12px; background: var(--ink-black); }
.council-total { width: 250px; flex-shrink: 0; display: flex; flex-direction: column; background: transparent; }
.council-total-title { text-align: center; font-size: 20px; color: #e8ded0; padding: 4px 0; font-family: 'Limelight', serif; }
.council-total-list { overflow-y: auto; max-height: 130px; padding: 0 12px 6px; font-size: 12px; }
.council-total-row { display: flex; justify-content: space-between; gap: 8px; line-height: 1.55; color: var(--text-cream); }
.council-total-row b { color: #fff; font-weight: 600; }
.council-total-row.inactive { opacity: 0.45; text-decoration: line-through; }
.council-inventory { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 0 4px; background: transparent; }
.council-inv-title { display: flex; justify-content: space-between; align-items: baseline; font-family: 'Limelight', serif; font-size: 14px; color: var(--gold-primary); }
.council-inv-title b { color: var(--gold-highlight); font-weight: 600; }
.council-count { font: 12px 'Josefin Sans', sans-serif; color: var(--text-dim); }
.council-hint-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.council-owned { display: flex; flex-wrap: wrap; gap: 6px; overflow-y: auto; max-height: 144px; align-content: flex-start; }
.council-owned-card { position: relative; overflow: hidden; width: 66px; height: 66px; padding: 2px; background: linear-gradient(135deg, #4a4a6a, #23233a); border: 2px solid #8a8a8a; cursor: pointer; }
.council-owned-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.council-owned-card.lvl-mid { border-color: #4f7fd6; background: linear-gradient(135deg, #2e4f8a, #16254a); }
.council-owned-card.lvl-high { border-color: #9a4fd6; background: linear-gradient(135deg, #6a3aa6, #2a1648); }
.council-owned-card.lvl-top { border-color: #c49b66; background: linear-gradient(135deg, #8d6837, #3e2d16); }
.council-owned-card.selected { box-shadow: 0 0 10px 2px rgba(238, 215, 185, 0.85); border-color: var(--gold-highlight); }
.council-owned-card.seated::after { content: '★'; position: absolute; left: 0; bottom: 0; width: 20px; height: 20px; line-height: 20px; text-align: center; color: #ddac6c; font-size: 15px; background: #302210; border: 1px solid var(--gold-classic); }
.council-owned-slot { width: 66px; height: 66px; display: flex; align-items: center; justify-content: center; background: #121212; border: 2px solid #2a2a2a; font-size: 24px; opacity: 0.55; }
.council-owned-card .lvl { position: absolute; right: 3px; top: 1px; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.council-empty-list, .council-hint { font-size: 11px; color: var(--text-dim); }
.council-msg { flex-shrink: 0; min-height: 18px; margin: 4px 14px 8px; font-size: 12px; color: #e3bb86; }

/* fenêtre Promouvoir / Améliorer : fenêtre standard du jeu (rideau, cadre, titre en trapèze, onglets) avec le contenu de l'original */
.council-upgrade-window { width: 700px; max-width: 96%; height: 470px; max-height: 96%; }
.council-upgrade-window .modal-inner-padding { flex: 1; min-height: 0; overflow: hidden; }
#cub-body { color: var(--text-cream); font-family: 'Josefin Sans', sans-serif; }
.cub-compare { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 4px 0 8px; }
.cub-panel { flex: 1; height: 140px; box-sizing: border-box; padding: 0 0 6px; background: rgba(110, 110, 110, 0.55); border: 2px solid #b9b9b9; }
.cub-panel-head { text-align: center; font-size: 13px; color: #d8d8d8; background: rgba(0, 0, 0, 0.25); padding: 2px 0; }
.cub-panel-sub { text-align: center; font-size: 12px; color: #9a9aff; min-height: 17px; background: rgba(0, 0, 0, 0.18); }
.cub-row { display: flex; justify-content: space-between; gap: 10px; padding: 1px 14px; font-size: 12px; line-height: 1.5; }
.cub-row b { font-weight: 600; color: #fff; }
.cub-row.inactive { opacity: 0.45; text-decoration: line-through; }
.cub-chevron { width: 34px; height: 54px; flex-shrink: 0; background: linear-gradient(90deg, #74542a, var(--gold-light) 60%, var(--gold-classic)); clip-path: polygon(0 0, 55% 0, 100% 50%, 55% 100%, 0 100%, 45% 50%); }
.cub-cards { display: flex; gap: 12px; justify-content: center; margin: 4px 14px; }
.cub-card { position: relative; width: 112px; display: flex; flex-direction: column; cursor: pointer; background: #1a1a1a; border: 2px solid #4a4a4a; }
.cub-card input { position: absolute; opacity: 0; pointer-events: none; }
.cub-card:has(input:checked) { border-color: #75d1af; box-shadow: 0 0 10px rgba(117, 209, 175, 0.7); }
.cub-card.off { opacity: 0.5; cursor: default; }
.cub-card-title { text-align: center; font-size: 12px; background: #0e0e0e; padding: 2px 0; color: #ede3d7; border-bottom: 1px solid #4a4a4a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cub-card-art > img { height: 54px; width: auto; max-width: 90%; object-fit: contain; }
.cub-card-art { height: 58px; display: flex; align-items: center; justify-content: center; font-size: 34px; background: radial-gradient(circle, #cfcfcf 0%, #7a7a7a 90%); }
.cub-card-qty { position: absolute; right: 4px; bottom: 3px; padding: 0 5px; font: 700 12px 'Josefin Sans', sans-serif; color: #fff; background: rgba(0, 0, 0, 0.85); border: 1px solid #888; }
.cub-chance { display: flex; align-items: center; gap: 10px; margin: 12px 14px 2px; }
.cub-level { min-width: 66px; font: 700 15px 'Limelight', serif; color: #e86e61; letter-spacing: 1px; }
.cub-bar { flex: 1; height: 12px; background: #262626; border: 1px solid #6a6a6a; }
#cub-fill { height: 100%; width: 0; background: linear-gradient(90deg, #bf4133, #c49b66, #75d1af); }
.cub-chance b { min-width: 42px; text-align: right; }
.cub-note { margin: 8px 14px; min-height: 30px; font-size: 11px; color: #c3b6a4; }
.cub-foot { margin: 6px 14px 0; display: flex; align-items: center; justify-content: center; gap: 18px; }
.cub-cost { font-size: 13px; color: var(--text-cream); }
.council-upgrade:disabled { opacity: 0.45; cursor: default; }

/* temps de prison en temps réel sur le portrait du bas */
.council-jail-time { position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 0; text-align: center; font: 700 11px 'Josefin Sans', sans-serif; color: #fff; background: rgba(33, 95, 74, 0.9); }

/* menu d'un conseiller de la grille : Promouvoir / Améliorer / Retirer-Nommer (d'après l'original) */
.council-card-menu { position: fixed; z-index: 30; min-width: 120px; background: #191714; border: 1px solid #7a6448; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.85); font-family: 'Josefin Sans', sans-serif; }
.council-card-menu.hidden { display: none; }
.council-card-menu button { display: block; width: 100%; padding: 4px 12px; text-align: left; font-size: 14px; color: var(--gold-light); background: none; border: 0; cursor: pointer; }
.council-card-menu button:hover:not(:disabled) { background: #605342; color: #fff; }
.council-card-menu button:disabled { color: #7a7058; cursor: default; }

/* Poste « à venir » (réglé dans l'onglet Conseil de l'admin) : fauteuil assombri, aucun conseiller */
.council-seat.soon { cursor: not-allowed; }
.council-seat.soon .council-empty-chair { filter: grayscale(1) brightness(0.55); }
.council-soon-tag { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); z-index: 4; white-space: nowrap; font-family: 'Limelight', serif; font-size: clamp(11px, 1.8vw, 18px); letter-spacing: 1px; color: #ede3d7; text-shadow: 0 1px 4px #000, 0 0 8px #000; }

/* visage d'un conseiller tiré du buste assis : on garde la tête et les épaules (haut de l'image), partout où un portrait est affiché */
.advisor-face-box { display: block; width: 100%; height: 100%; overflow: hidden; }
.advisor-face-box .advisor-face { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transform: scale(2.4); transform-origin: 50% 6%; display: block; }
