/* ============================================================
   ASTRA GENESIS, 38-resource-drawer.css
   v0.92.7, panneau des ressources et épinglage (js/02j-resource-drawer.js).
   La languette du bord droit, le contenu du panneau latéral (portrait de
   Rurik, compteurs, épingles) et la barre du haut resserrée quand plus de
   5 ressources y sont épinglées. Les lignes elles-mêmes sont celles des
   ressources secondaires (css/15-secondary-resources.css).
   ============================================================ */

/* ---------- languette du bord droit ----------
   Fine, centrée entre la barre du haut et le menu du bas, coins coupés
   comme les boutons du jeu, chevrons au trait dans l'ambre des boutons.
   Sous le panneau latéral (700) : ouverte, elle glisse avec lui et se
   colle à son bord gauche. 12 px de large : elle tient dans la marge de
   14 px qui borde la colonne de droite des écrans (mesuré à 1920 x 1080),
   et s'élargit au survol. */
.rd-tab{
  position:fixed;right:0;z-index:690;
  top:calc((var(--hud-h) + var(--ribbon-h) + 100vh - var(--nav-h)) / 2);
  transform:translateY(-50%);
  display:flex;align-items:center;justify-content:center;
  width:12px;height:calc(112px*var(--text-scale));padding:0;
  border:0;cursor:pointer;color:var(--rf-amber);
  background:#07111b;
  box-shadow:inset 1px 0 0 rgba(221,160,72,.45), inset 0 1px 0 rgba(221,160,72,.22), inset 0 -1px 0 rgba(221,160,72,.22);
  clip-path:polygon(5px 0, 100% 0, 100% 100%, 5px 100%, 0 calc(100% - 5px), 0 5px);
  transition:right .28s cubic-bezier(.2,.8,.2,1), width .15s, opacity .2s, background-color .15s, color .15s;
}
.rd-tab:hover, .rd-tab:focus-visible{width:22px;background:#0E1B27;color:var(--rf-hero-hi);}
.rd-tab:focus-visible{outline:2px solid var(--rf-amber);outline-offset:-3px;}
.rd-tab-chev{display:flex;flex-direction:column;align-items:center;gap:0;transition:transform .28s cubic-bezier(.2,.8,.2,1);}
.rd-tab-chev svg{display:block;width:8px;height:16px;margin:-3px 0;}
.rd-tab-chev svg + svg{opacity:.55;}
/* même retrait du bord que le panneau flottant (#sidepanel, right, dans
   css/40-refonte.css) */
.rd-tab.open{right:calc(var(--panel-w) + clamp(0px, 1vw, 16px));}
.rd-tab.open .rd-tab-chev{transform:scaleX(-1);}
/* un autre contenu (fiche, alertes) occupe le panneau : elle s'efface */
.rd-tab.under{opacity:0;visibility:hidden;pointer-events:none;}
@media (prefers-reduced-motion: reduce){
  .rd-tab, .rd-tab-chev{transition:none;}
}
html.fx-reduced .rd-tab, html.fx-reduced .rd-tab-chev{transition:none;}
/* téléphone : le panneau prend toute la largeur, sa croix le referme */
@media (max-width:760px){
  .rd-tab.open{opacity:0;visibility:hidden;pointer-events:none;}
}

/* ---------- contenu du panneau ---------- */
.rd{display:flex;flex-direction:column;gap:14px;}
.rd-head{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;align-items:center;}
.rd-face{
  width:56px;height:56px;object-fit:cover;display:block;
  clip-path:polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.rd-hint{margin:0;font-size:.84rem;line-height:1.45;color:var(--rf-text, var(--ink-2));}
.rd-counts{
  display:flex;flex-wrap:wrap;gap:6px 16px;padding:8px 10px;
  background:rgba(221,160,72,.06);box-shadow:inset 2px 0 0 var(--rf-amber);
  font-family:var(--font-head);font-size:.8rem;font-weight:600;color:var(--rf-label, var(--ink-2));
}
.rd-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px;}
.rd-row.is-locked .sr-row{opacity:.5;}
.rd-pin{
  display:inline-flex;align-items:center;justify-content:center;
  width:32px;height:32px;padding:0;border:0;background:transparent;cursor:pointer;
  color:var(--rf-dim, var(--ink-3));transition:color .15s, background-color .15s;
}
.rd-pin svg{width:17px;height:17px;}
.rd-pin:hover{color:var(--rf-amber);background:rgba(221,160,72,.08);}
.rd-pin:focus-visible{outline:2px solid var(--rf-amber);outline-offset:-2px;}
.rd-pin.on{color:var(--rf-amber);}
.rd-pin.on svg path:first-child{fill:rgba(221,160,72,.35);}
.rd-pin.is-full{opacity:.35;cursor:not-allowed;}
.rd-pin.is-full:hover{color:var(--rf-dim, var(--ink-3));background:transparent;}
.rd-all{align-self:stretch;margin-top:2px;}

/* ---------- barre du haut resserrée (plus de 5 épingles) ----------
   Jusqu'à 8 ressources, le bouton Matériaux, l'Électricité et le Scrip :
   le nom s'efface (l'image et l'infobulle le donnent), les marges se
   resserrent. */
#hud #hud-res.res-dense .res .name{display:none;}
#hud #hud-res.res-dense .res{gap:6px;padding:0 8px;}
@media (max-width:1500px){
  #hud #hud-res.res-dense .res{padding:0 5px;}
  #hud #hud-res.res-dense .res .ic{width:24px;height:24px;}
}
