/* ==========================================================================
   COSA NOSTRA 1935 — habillage art déco propre au jeu
   Charbon, laiton et vert bouteille (refonte du 22/11/2026, voir 99-zdeco-frames.css)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Limelight&family=Josefin+Sans:wght@400;600;700&family=Special+Elite&display=swap');
/* [00-base] Portail web, conteneur principal du jeu */

:root {
  /* Fenêtres : taille commune (cf. 99-modal-uniform.css). Standard = boutique/inventaire */
  --modal-w: 860px;
  --modal-h: 610px;
  --modal-small-w: 560px;
  --modal-small-h: 420px;
  --modal-top: 30px; /* bandeau de ressources (27 px) + liseré */
  --bg-dark: #060708;
  --gold-highlight: #eed7b9;
  --gold-primary: #b88e56;
  --gold-dark: #66461b;
  --gold-shadow: #30200b;
  
  --red-velvet: #215644;
  --red-crimson: #337f66;
  --red-bright: #b63e31;
  --red-dark: #112f25;

  --panel-bg: #0f1113;
  --panel-border: #433523;
  --text-gold: #e6d2b7;
  --text-main: #ebe4db;
  --text-dim: #a89a88;
  /* Couleurs nommées : les valeurs les plus répétées de la feuille de style (exactement celles qui étaient écrites en dur) */
  --gold-bright: #cf8a30;
  --gold-classic: #b68c55;
  --gold-bronze: #9d815d;
  --gold-pale: #dec4a2;
  --gold-light: #e9c9a0;
  --gold-amber: #e3bb87;
  --gold-brass: #a07f54;
  --gold-soft: #b08e62;
  --gold-sand: #ceb28e;
  --gold-old: #a07e52;
  --text-cream: #e3ddd5;
  --red-blood: #276d56;
  --red-alarm: #399a7a;
  --ink-black: #050505;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  background: radial-gradient(ellipse at center, #13161a 0%, #050303 75%);
  color: var(--text-main);
  font-family: 'Josefin Sans', sans-serif;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   PORTAIL : une barre fine de 36 px (emblème et nom à gauche, feuille de route au centre, compte à droite)
   ========================================================================== */
#portal-header-bar {
  position: relative;
  z-index: 150;
  flex-shrink: 0;
  height: 36px;
  background: var(--deco-charcoal, #15171a);
  border-bottom: 3px double var(--deco-brass, #b98b4e);
  font-family: 'Josefin Sans', sans-serif;
}
.portal-inner {
  position: relative;
  width: max(var(--frame-w, 980px), 760px);
  max-width: 100%;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
}
.portal-bar { justify-content: space-between; padding: 0 8px; box-sizing: border-box; }
.portal-left-brand { display: flex; align-items: center; gap: 8px; pointer-events: none; }
.brand-emblem { width: 26px; height: 26px; }
.brand-title {
  font-family: 'Limelight', serif;
  font-size: 17px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--deco-ivory, #e9dfc8);
}
.brand-subtitle {
  padding-left: 8px;
  border-left: 1px solid var(--deco-brass, #b98b4e);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--deco-brass-hi, #e2c48f);
}
.portal-center-nav { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 26px; }
.portal-link {
  color: var(--deco-brass-hi, #e2c48f);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
}
.portal-link:hover { color: var(--deco-ivory, #e9dfc8); }
.portal-right-user { display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--deco-ivory, #e9dfc8); }
.user-greeting strong { font-weight: 700; }
.portal-user-links { display: flex; }

/* ==========================================================================
   CONTENEUR PRINCIPAL DU JEU
   ========================================================================== */
/* Hôte du cadre : occupe l'espace sous le portail ; le cadre y est centré et mis à l'échelle par app.js */
#stage-host {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

/* Cadre de jeu fixe 980x640 (format du client d'origine), bordé de bordeaux */
#game-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 980px;
  height: 640px;
  transform-origin: 0 0;
  background: #000;
  overflow: hidden;
  box-shadow: 0 0 0 1px #000, 0 0 0 4px #122e25, 0 0 0 5px #245645, 0 0 40px rgba(0, 0, 0, 0.95);
}
.res-ico { display: inline-block; width: 1.3em; height: 1.3em; vertical-align: -0.3em; flex-shrink: 0; }

/* Liste déroulante à icônes (Marché noir : ressource cédée / obtenue) */
.res-select { position: relative; width: 100%; }
.res-select-btn, .res-select-opt { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0 12px; height: 36px; box-sizing: border-box; font-family: inherit; font-size: 13px; color: #fff; background: #161819; border: 1px solid var(--gold-classic); cursor: pointer; text-align: left; }
.res-select-btn { border-radius: 3px; }
.res-select-caret { margin-left: auto; color: var(--gold-classic); }
.res-select-list { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #161819; border: 1px solid var(--gold-classic); border-top: 0; box-shadow: 0 6px 14px #000; }
.res-select.is-open .res-select-list { display: block; }
.res-select-opt { border: 0; border-bottom: 1px solid #2d3237; }
.res-select-opt:hover, .res-select-opt.is-on { background: #33291b; }

/* Panneau de volume (au survol du bouton son) */
.volume-panel { position: fixed; z-index: 9500; display: grid; gap: 8px; padding: 10px 12px; font-size: 12px; color: #e6d4bd; background: linear-gradient(180deg, #1a1c1d, #08090a); border: 1px solid var(--gold-brass); border-radius: 4px; box-shadow: 0 4px 12px #000; }
.volume-panel.hidden { display: none; }
.vol-row { display: grid; grid-template-columns: 24px 50px 120px 38px; align-items: center; gap: 8px; }
.vol-mute { display: flex; align-items: center; justify-content: center; width: 24px; height: 22px; padding: 0; font-size: 13px; line-height: 1; cursor: pointer; color: #fff; background: #252729; border: 1px solid var(--gold-brass); border-radius: 3px; }
.vol-mute.is-off { opacity: 0.45; filter: grayscale(1); }
.vol-row input[type="range"] { width: 100%; accent-color: #ba4234; cursor: pointer; }
.vol-val { text-align: right; color: #fff; }
#btn-sound-all.muted { opacity: 0.55; filter: grayscale(1); }

/* Clavier : contour or du jeu sur l'élément ciblé (remplace les contours retirés champ par champ) */
:focus-visible {
  outline: 2px solid var(--gold-primary) !important;
  outline-offset: 2px;
}

/* Mouvement réduit (réglage du système) : plus d'animations ni de transitions longues, l'état final s'affiche d'un coup */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Zones cliquables : le dessin ne bouge pas, la zone qui réagit au clic grandit (24 px au moins, comme le demande WCAG 2.2) */
.hud-boost-btn::before,
.card-qty-stepper .qty-dropdown-arrow::before,
.portal-user-links .portal-link::before {
  content: '';
  position: absolute;
  inset: -4px;
}
.card-qty-stepper .qty-dropdown-arrow { position: relative; }
.portal-user-links .portal-link { position: relative; }
.portal-user-links .portal-link::before { inset: -8px -5px; }
