/* Menu flottant à gauche (menu-gauche.js, suggestion n° 34) : PC seulement (1100 px et plus) et seulement si le réglage est choisi (html.menu-gauche).
   Même charte que le reste : nuit violette, or, Georgia. Sans ce réglage, ou sous 1100 px, rien de ce fichier ne s'applique. */
@media (min-width: 1100px) {
  html.menu-gauche #vue-jeu:not([hidden]) { display: grid; grid-template-columns: 208px minmax(0, 1fr); column-gap: 20px; row-gap: 0; align-items: start; }
  html.menu-gauche #vue-jeu > * { grid-column: 2; min-width: 0; }
  /* la colonne : collée en haut de l'écran quand on descend, avec son propre défilement si l'écran est bas */
  html.menu-gauche #vue-jeu > .barre-bas {
    grid-column: 1; grid-row: 1 / span 40; position: sticky; top: 10px; bottom: auto; left: auto; right: auto; z-index: 6; align-self: start;
    display: flex; flex-direction: column; gap: 3px; margin-top: 8px; padding: 8px; max-height: calc(100vh - 20px); overflow-y: auto;
    border: 1px solid rgba(212, 169, 87, .5); border-radius: 12px;
    background: linear-gradient(180deg, rgba(26, 20, 38, .97), rgba(13, 10, 20, .98));
    box-shadow: inset 0 0 0 3px rgba(11, 9, 17, .7), inset 0 0 0 4px rgba(212, 169, 87, .14), 0 6px 20px rgba(0, 0, 0, .5);
    scrollbar-width: thin;
  }
  html.menu-gauche .onglets { display: contents; }   /* les boutons deviennent les cases de la colonne ; menu-gauche.js leur donne leur ordre */
  html.menu-gauche .plus-onglets { display: none; }
  html.menu-gauche #sous-nav { display: none !important; }   /* ses écrans sont dans la colonne, sous le pôle actif ; les onglets internes (Spatioport, Marché) restent dans leur panneau */

  html.menu-gauche nav.onglets button {
    position: relative; width: 100%; min-height: 46px; padding: 0 12px; display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px;
    border: 1px solid transparent; border-radius: 9px; background: transparent; box-shadow: none;
    font: 500 1.02rem/1.2 var(--police-texte, Georgia, serif); letter-spacing: 0; text-align: left; color: #d6cbb4;
  }
  html.menu-gauche nav.onglets button[hidden] { display: none; }   /* Atelier, Marché, Base : cachés tant qu'ils ne sont pas ouverts */
  html.menu-gauche nav.onglets button::before { display: none; }
  html.menu-gauche nav.onglets .ic { display: block; flex: none; width: 24px; height: 24px; opacity: 1; color: var(--or); stroke-width: 2; }
  html.menu-gauche nav.onglets .lib-court { display: none; }
  html.menu-gauche nav.onglets button:hover { color: #fff6dc; background: rgba(212, 169, 87, .1); border-color: rgba(212, 169, 87, .3); }
  html.menu-gauche nav.onglets button[aria-selected="true"] {
    color: #fff6dc; font-weight: 700; border-color: rgba(212, 169, 87, .4);
    background: linear-gradient(90deg, rgba(212, 169, 87, .28), rgba(212, 169, 87, .06) 85%, transparent), linear-gradient(180deg, rgba(34, 27, 44, .92), rgba(18, 14, 26, .96));
    box-shadow: inset 4px 0 0 var(--or-vif, #f0d797);   /* le trait d'or et le gras disent « actif » sans la couleur seule */
  }
  html.menu-gauche nav.onglets button[aria-selected="true"] .ic { color: var(--or-vif, #f0d797); }
  html.menu-gauche nav.onglets .pt.pt-n, html.menu-gauche nav.onglets .pt.pt-lire, html.menu-gauche nav.onglets .pt.pt-panne { margin-left: auto; }   /* les mêmes pastilles que la barre : écran neuf, rapports à lire, pièce en panne */
  html.menu-gauche[data-theme="tole"] #vue-jeu > .barre-bas { background: #15110e; border-color: rgba(212, 169, 87, .35); }

  /* les écrans de l'onglet actif, dépliés sous lui : un fil d'or à gauche, des lignes plus petites */
  html.menu-gauche .sous-liste { display: flex; flex-direction: column; gap: 2px; margin: 0 0 6px 21px; padding-left: 8px; border-left: 1px solid rgba(212, 169, 87, .45); }
  html.menu-gauche .sous-liste-choix {
    position: relative; width: 100%; min-height: 38px; padding: 0 10px; display: flex; align-items: center; justify-content: flex-start; gap: 8px; flex-wrap: wrap;
    border: 1px solid transparent; border-radius: 8px; background: transparent; box-shadow: none; text-align: left;
    font: 400 .94rem/1.2 var(--police-texte, Georgia, serif); color: var(--texte-doux, #b9b0c6);
  }
  html.menu-gauche .sous-liste-choix svg { display: block; flex: none; width: 16px; height: 16px; color: var(--or); }
  html.menu-gauche .sous-liste-choix:hover { color: #fff6dc; background: rgba(212, 169, 87, .1); }
  html.menu-gauche .sous-liste-choix[aria-current="page"] { color: var(--or-clair, #e6cf94); font-weight: 700; border-color: rgba(212, 169, 87, .45); background: #241d30; }
  html.menu-gauche .sous-liste .chip { padding: 0 7px; border: 1px solid var(--or); border-radius: 99px; background: #2a2326; color: var(--or-clair); font-size: .74rem; font-weight: 400; }
  html.menu-gauche .sous-liste-choix[data-alerte="1"]::after { content: ""; position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--or-vif, #f0d797); }
  html.menu-gauche nav.onglets button:focus-visible, html.menu-gauche .sous-liste-choix:focus-visible { outline: 2px solid var(--or-vif, #f0d797); outline-offset: 1px; }
  html.menu-gauche .menu-gauche-liens { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(212, 169, 87, .24); }
  html.menu-gauche .menu-gauche-lien { display: block; padding: 6px 10px; border-radius: 7px; color: var(--texte-doux, #b9b0c6); font-size: .82rem; text-decoration: none; }
  html.menu-gauche .menu-gauche-lien:hover, html.menu-gauche .menu-gauche-lien:focus-visible { color: var(--or-clair, #e6cf94); background: rgba(212, 169, 87, .1); }

  /* la Carte est « bord à bord » de la fenêtre (plateau.js la mesure) : à côté de la colonne, elle prend seulement la largeur de son écran, sinon elle passerait dessous */
  html.menu-gauche .carte-plein { width: 100%; margin-left: 0; }

  /* la page fait 1600 px au plus sur tous les écrans (bordure.css, « Une seule largeur de page en jeu ») : plus rien à élargir ici */
}

/* À côté de la colonne du menu, un écran est une case de grille : avec des marges automatiques il se réduirait à son contenu (ou déborderait).
   Il prend donc toute la largeur de sa case, comme partout ailleurs (maquette des blocs du 02/12 : plus de plafond par écran).
   « :not(#aucun) » ne retire rien : il donne à la règle le poids d'un identifiant. */
@media (min-width: 1100px) {
  html.menu-gauche #vue-jeu > .panneau:not(#aucun) { margin-inline: 0; justify-self: center; width: 100%; }
}

/* Les paliers de colonnes de bordure.css et de theme-bord.css comptent la largeur de la fenêtre : la colonne prend 228 px, il en manque autant au contenu.
   Sous 1720 px, le Bord passe de trois à deux colonnes (le but et le pack du jour s'empilent à droite) et la Cantina de trois à deux. */
@media (min-width: 1100px) and (max-width: 1719px) {
  html.menu-gauche #panneau-bord .bord-grille:not(.premiere), html.menu-gauche #panneau-bord .bord-grille:not(.premiere):not(:has(.bord-col-p)) { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  html.menu-gauche #panneau-bord .bord-grille:not(.premiere) > .bord-col-d { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; grid-column: 2; grid-row: 1 / -1; min-width: 0; align-content: start; }
  html.menu-gauche #panneau-bord .bord-grille:not(.premiere) .bord-col-c, html.menu-gauche #panneau-bord .bord-grille:not(.premiere) .bord-col-p { grid-column: auto; grid-row: auto; }
  html.menu-gauche #panneau-cantina { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
