/* ===== PACMOULE — Web 1.0 / Années 2000 Kitch ===== */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Comic+Neue:wght@700&display=swap');

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

body {
  font-family: 'Comic Sans MS', 'Comic Neue', cursive, sans-serif;
  background: #0a0015;
  color: #ffe066;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Fond sombre avec motif rétro répété */
.stars-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: #0a0015;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #ff00ff, transparent),
    radial-gradient(2px 2px at 40px 70px, #00ff88, transparent),
    radial-gradient(1px 1px at 90px 40px, #ffff00, transparent),
    radial-gradient(2px 2px at 130px 80px, #00ffff, transparent),
    radial-gradient(1px 1px at 160px 120px, #ff66aa, transparent),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 19px,
      rgba(0, 255, 136, 0.03) 19px,
      rgba(0, 255, 136, 0.03) 20px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 19px,
      rgba(255, 0, 255, 0.03) 19px,
      rgba(255, 0, 255, 0.03) 20px
    );
  background-size: 200px 150px, 200px 150px, 200px 150px, 200px 150px, 200px 150px, 20px 20px, 20px 20px;
  animation: bg-drift 40s linear infinite;
}

@keyframes bg-drift {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  to { background-position: 200px 150px, -200px 150px, 100px -75px, -100px 75px, 50px 50px, 0 0, 0 0; }
}

/* ===== MARQUEE ===== */
.top-marquee {
  display: block;
  background: linear-gradient(90deg, #ff0080, #7928ca, #ff0080);
  color: #ffff00;
  font-weight: bold;
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 3px solid #00ff88;
  text-shadow: 1px 1px 0 #000;
  letter-spacing: 1px;
}

/* ===== HEADER / NEON ===== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 18px 10px 8px;
  flex-wrap: wrap;
}

.pacmoule-logo-img {
  width: clamp(100px, 18vw, 160px);
  height: auto;
  border: 3px ridge #39ff14;
  box-shadow: 0 0 16px rgba(57, 255, 20, 0.45), 4px 4px 0 #000;
  background: #00102a;
  image-rendering: auto;
}

.pacmoule-logo-img.victory-logo {
  width: 140px;
  margin: 0 auto 8px;
  display: block;
}

.header-titles {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.neon-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(12px, 2.2vw, 18px);
  text-align: center;
  line-height: 1.6;
  animation: blink-neon 1.2s step-start infinite;
}

.neon-green {
  color: #39ff14;
  text-shadow:
    0 0 5px #39ff14,
    0 0 10px #39ff14,
    0 0 20px #39ff14,
    0 0 40px #0f0,
    2px 2px 0 #000;
}

.neon-pink {
  display: block;
  color: #ff2d95;
  text-shadow:
    0 0 5px #ff2d95,
    0 0 10px #ff2d95,
    0 0 20px #ff2d95,
    0 0 40px #f0f,
    2px 2px 0 #000;
  margin-top: 6px;
}

@keyframes blink-neon {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0.55; }
}

.spinning-gif {
  animation: spin 3s linear infinite;
  filter: drop-shadow(0 0 6px #ff0);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.under-construction {
  text-align: center;
  color: #ff0;
  font-size: 13px;
  padding: 4px;
  background: #330033;
  border-top: 2px dashed #ff0;
  border-bottom: 2px dashed #ff0;
}

blink, .promo-blink {
  animation: classic-blink 1s step-start infinite;
}

@keyframes classic-blink {
  50% { opacity: 0; }
}

/* ===== LAYOUT 3 COLONNES ===== */
.layout-3col {
  display: grid;
  grid-template-columns: 160px 1fr 200px;
  gap: 12px;
  max-width: 960px;
  margin: 16px auto;
  padding: 0 8px;
  align-items: start;
}

@media (max-width: 800px) {
  .layout-3col {
    grid-template-columns: 1fr;
  }
  .col-center {
    order: 1;
  }
  .col-left {
    order: 2;
  }
  .col-right {
    order: 3;
  }
  .col-left, .col-right {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
}

/* ===== ENCARTS FICTIFS (kitsch web 2000) ===== */
.encart-fictif {
  background: linear-gradient(180deg, #220044, #110022);
  border: 3px ridge #ff00ff;
  padding: 10px 6px;
  margin-bottom: 10px;
  text-align: center;
  box-shadow: 4px 4px 0 #000, inset 0 0 20px rgba(255, 0, 255, 0.2);
}

.encart-fictif.pink {
  border-color: #ff6699;
  background: linear-gradient(180deg, #440022, #220011);
}

.encart-fictif.green {
  border-color: #39ff14;
  background: linear-gradient(180deg, #003311, #001a08);
}

.encart-fictif.yellow {
  border-color: #ffcc00;
  background: linear-gradient(180deg, #332200, #1a1100);
}

.encart-fictif.vertical {
  min-height: 140px;
}

.encart-fictif.small {
  font-size: 13px;
}

.partner-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 10px;
}

.partner-row > .encart-fictif {
  width: 100%;
  margin-bottom: 0;
  min-width: 0;
}

/* Côte à côte uniquement sur mobile */
@media (max-width: 800px) {
  .partner-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .partner-row > .encart-fictif {
    width: auto;
  }
}

a.baraki-style-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  padding: 8px 6px;
}

a.baraki-style-card:hover {
  border-color: #ffcc00;
  box-shadow: 0 0 12px rgba(255, 204, 0, 0.45);
}

.baraki-style-card img {
  display: block;
  width: 100%;
  height: auto;
  margin: 4px auto 0;
  border: 2px inset #666;
  image-rendering: auto;
}

.encart-label {
  font-size: 9px;
  color: #aaa;
  letter-spacing: 2px;
  margin-bottom: 6px;
  border-bottom: 1px dotted #666;
  padding-bottom: 2px;
}

.promo-flash {
  color: #ff0;
  font-weight: bold;
  animation: classic-blink 0.6s step-start infinite;
}

.encart-fictif .tiny {
  font-size: 11px;
  color: #ccc;
  margin: 4px 0;
  line-height: 1.3;
}

.encart-btn {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  background: linear-gradient(180deg, #ffff00, #ff9900);
  color: #000;
  font-weight: bold;
  font-size: 11px;
  text-decoration: none;
  border: 2px outset #fff;
  cursor: pointer;
  animation: classic-blink 1.4s step-start infinite;
}

.encart-btn:hover {
  background: linear-gradient(180deg, #fff, #ffcc00);
  border-style: inset;
}

.hit-counter-mini {
  text-align: center;
  color: #0f0;
  font-size: 10px;
  margin-top: 8px;
}

.hit-counter-mini pre {
  display: inline-block;
  background: #000;
  border: 2px solid #0f0;
  padding: 4px;
}

/* ===== CENTRE JEU ===== */
.col-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.game-frame {
  position: relative;
  background: #000;
  border: 6px ridge #00ffff;
  box-shadow:
    0 0 20px #00ffff,
    0 0 40px rgba(255, 0, 255, 0.4),
    inset 0 0 30px rgba(0, 255, 136, 0.1);
  padding: 8px;
  width: 100%;
  max-width: 460px;
}

.game-hud {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 4px 10px;
  background: linear-gradient(180deg, #1a0033, #000);
  border-bottom: 2px solid #ff00ff;
  margin-bottom: 6px;
}

.hud-item {
  text-align: center;
  flex: 1;
  min-width: 80px;
}

.hud-label {
  display: block;
  font-size: 9px;
  font-family: 'Press Start 2P', monospace;
  color: #ff00ff;
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.hud-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: #39ff14;
  text-shadow: 0 0 8px #39ff14;
}

.digestion-bar {
  width: 100%;
  height: 10px;
  background: #222;
  border: 2px inset #666;
  margin-top: 4px;
  overflow: hidden;
}

.digestion-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #39ff14, #ffff00, #ff0000);
  transition: width 0.3s;
  box-shadow: 0 0 8px #ff0;
}

#gameCanvas {
  display: block;
  margin: 0 auto;
  background: #000022;
  image-rendering: pixelated;
  border: 2px solid #333;
  max-width: 100%;
  height: auto;
}

.game-controls {
  text-align: center;
  padding: 10px 4px 4px;
}

.controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.controls-icons {
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.kitch-btn.icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  box-sizing: border-box;
}

/* Pad directionnel mobile / tactile */
.dpad {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  grid-template-rows: repeat(3, 64px);
  gap: 6px;
  justify-content: center;
  margin: 12px auto 4px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.dpad-btn {
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  background: linear-gradient(180deg, #66aaff, #2244aa);
  border: 3px outset #99ccff;
  border-radius: 8px;
  box-shadow: 2px 2px 0 #000;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.dpad-btn:active,
.dpad-btn.is-pressed {
  border-style: inset;
  background: linear-gradient(180deg, #ff66aa, #cc0066);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #000;
}

.dpad-up { grid-column: 2; grid-row: 1; }
.dpad-left { grid-column: 1; grid-row: 2; }
.dpad-center {
  grid-column: 2;
  grid-row: 2;
  background: linear-gradient(180deg, #333, #111);
  border-color: #666;
  color: #ff0;
  cursor: default;
  opacity: 0.85;
}
.dpad-right { grid-column: 3; grid-row: 2; }
.dpad-down { grid-column: 2; grid-row: 3; }

@media (min-width: 801px) {
  .dpad {
    grid-template-columns: repeat(3, 52px);
    grid-template-rows: repeat(3, 52px);
    opacity: 0.85;
  }
  .dpad-btn { font-size: 18px; }
}

.kitch-btn {
  font-family: 'Comic Sans MS', 'Comic Neue', cursive;
  font-size: 16px;
  font-weight: bold;
  padding: 8px 20px;
  background: linear-gradient(180deg, #ff66aa, #cc0066);
  color: #fff;
  border: 3px outset #ff99cc;
  cursor: pointer;
  text-shadow: 1px 1px 0 #000;
  box-shadow: 3px 3px 0 #000;
}

.kitch-btn:hover {
  background: linear-gradient(180deg, #ff99cc, #ff3388);
}

.kitch-btn:active {
  border-style: inset;
  box-shadow: 1px 1px 0 #000;
  transform: translate(2px, 2px);
}

.controls-hint {
  font-size: 11px;
  color: #aaa;
  margin-top: 8px;
}

.overlay-message {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.overlay-message.hidden {
  display: none;
}

.overlay-box {
  background: linear-gradient(180deg, #220044, #110022);
  border: 4px ridge #ffff00;
  padding: 24px;
  text-align: center;
  max-width: 90%;
  box-shadow: 0 0 30px #ff00ff;
}

.overlay-box h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  color: #ffff00;
  text-shadow: 0 0 10px #ff0;
  margin-bottom: 12px;
  line-height: 1.5;
}

.overlay-box p {
  color: #fff;
  margin-bottom: 16px;
  font-size: 14px;
}

.howto-box {
  margin-top: 12px;
  background: #110022;
  border: 3px dashed #00ff88;
  padding: 12px 16px;
  width: 100%;
  max-width: 460px;
}

.howto-box h3 {
  text-align: center;
  color: #00ff88;
  font-size: 14px;
  margin-bottom: 8px;
  text-shadow: 0 0 6px #0f8;
}

.howto-box ul {
  list-style: none;
  font-size: 13px;
  line-height: 1.7;
}

.howto-box li::before {
  content: "► ";
  color: #ff00ff;
}

/* ===== COLONNE DROITE ===== */
.visitor-counter {
  background: #000;
  border: 4px ridge #00ff00;
  padding: 10px;
  text-align: center;
  margin-bottom: 10px;
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
}

.counter-title {
  font-size: 10px;
  color: #0f0;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.counter-digits {
  display: flex;
  justify-content: center;
  gap: 2px;
}

.counter-digits span {
  display: inline-block;
  width: 22px;
  height: 28px;
  line-height: 28px;
  background: #001100;
  border: 2px inset #0a0;
  color: #0f0;
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  text-shadow: 0 0 6px #0f0;
}

.counter-sub {
  font-size: 9px;
  color: #6f6;
  margin-top: 6px;
}

.guestbook {
  background: #1a1020;
  border: 3px ridge #ffcc00;
  padding: 10px;
  margin-bottom: 10px;
}

.guestbook h3 {
  text-align: center;
  color: #ffcc00;
  font-size: 14px;
  margin-bottom: 8px;
  border-bottom: 1px dotted #886;
  padding-bottom: 4px;
}

.gb-entry {
  background: #0d0810;
  border: 1px solid #443;
  padding: 6px;
  margin-bottom: 6px;
  font-size: 11px;
}

.gb-entry strong {
  color: #ff66aa;
}

.gb-entry em {
  color: #888;
  font-size: 9px;
}

.gb-entry p {
  color: #ddd;
  margin-top: 2px;
}

.midi-note {
  background: #001122;
  border: 2px solid #00aaff;
  padding: 8px;
  text-align: center;
  margin-top: 8px;
}

.midi-note pre {
  font-size: 10px;
  color: #0af;
  line-height: 1.4;
}

/* ===== FOOTER ===== */
.site-footer {
  margin-top: 24px;
  border-top: 4px double #ff00ff;
  background: #050010;
  padding: 10px;
  text-align: center;
}

.site-footer marquee {
  color: #ff99cc;
  font-size: 12px;
  margin-bottom: 8px;
}

.footer-bestline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  margin: 10px auto;
  padding: 8px 12px;
  max-width: 720px;
  background: #000;
  border: 3px ridge #00ff00;
  color: #0f0;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  line-height: 1.5;
  box-shadow: 0 0 12px rgba(0, 255, 0, 0.35);
}

.footer-bestline .best-viewed {
  color: #ffff00;
  text-shadow: 0 0 6px #ff0;
}

.footer-bestline .footer-sep {
  color: #0a0;
}

.footer-bestline .footer-visits {
  color: #39ff14;
}

.footer-bestline .footer-visits strong {
  color: #fff;
  letter-spacing: 1px;
}

.footer-links {
  font-size: 12px;
  margin: 8px 0;
}

.footer-links a {
  color: #00ffff;
  text-decoration: underline;
}

.footer-links a:hover {
  color: #ffff00;
  background: #ff00ff;
}

.netscape-badge {
  font-size: 11px;
  color: #888;
  margin-top: 6px;
}

/* ===== FAUSSES POPUPS (popups-kitch.js) ===== */
.kitch-popup {
  position: fixed;
  z-index: 9999;
  width: 320px;
  font-family: 'MS Sans Serif', Tahoma, sans-serif;
  font-size: 12px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.6);
  animation: popup-in 0.25s ease-out;
  user-select: none;
}

@keyframes popup-in {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.kitch-popup-titlebar {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  padding: 3px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  font-weight: bold;
  font-size: 11px;
}

.kitch-popup-titlebar .title-text {
  display: flex;
  align-items: center;
  gap: 4px;
}

.kitch-popup-close {
  width: 16px;
  height: 14px;
  background: #c0c0c0;
  border: 2px outset #fff;
  color: #000;
  font-size: 10px;
  font-weight: bold;
  line-height: 10px;
  padding: 0;
  cursor: pointer;
  font-family: Tahoma, sans-serif;
}

.kitch-popup-close:active {
  border-style: inset;
}

.kitch-popup-body {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #dfdfdf #0a0a0a #0a0a0a #dfdfdf;
  padding: 16px 12px;
  text-align: center;
  color: #000;
}

.kitch-popup-body .popup-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.kitch-popup-body .popup-msg {
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 12px;
  line-height: 1.4;
}

.kitch-popup-click {
  display: inline-block;
  padding: 8px 16px;
  background: linear-gradient(180deg, #ffff00, #ff6600);
  border: 3px outset #fff;
  color: #c00;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  animation: classic-blink 0.8s step-start infinite;
  text-shadow: 1px 1px 0 #fff;
}

.kitch-popup-click:hover {
  background: linear-gradient(180deg, #fff, #ff9900);
}

.kitch-popup-footer {
  background: #c0c0c0;
  border-top: 1px solid #808080;
  padding: 4px 8px;
  font-size: 9px;
  color: #666;
  text-align: right;
}

/* ===== WIN95 POPUP TOGGLE ===== */
.win95-panel {
  margin: 12px auto 4px;
  max-width: 340px;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #dfdfdf #0a0a0a #0a0a0a #dfdfdf;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
  font-family: 'MS Sans Serif', Tahoma, sans-serif;
  color: #000;
  text-align: left;
}

.win95-panel-title {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 6px;
}

.win95-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 10px 6px;
  font-size: 12px;
  cursor: pointer;
  line-height: 1.3;
}

.win95-check input {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  accent-color: #000080;
  flex-shrink: 0;
}

.win95-btn {
  display: block;
  margin: 0 10px 10px;
  padding: 4px 10px;
  font-family: 'MS Sans Serif', Tahoma, sans-serif;
  font-size: 12px;
  background: #c0c0c0;
  border: 2px outset #fff;
  color: #000;
  cursor: pointer;
}

.win95-btn:active {
  border-style: inset;
}

.popup-toggle-panel.is-blocked .win95-panel-title {
  background: linear-gradient(90deg, #800000, #c04040);
}

/* ===== LOGOS / BADGE ===== */
.brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.pacmoule-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #220044, #110022);
  border: 3px ridge #39ff14;
  padding: 6px 14px;
  box-shadow: 0 0 12px #39ff14, 3px 3px 0 #000;
}

.pacmoule-logo.compact {
  padding: 4px 10px;
  border-width: 2px;
}

.logo-shell {
  font-size: 28px;
  animation: spin 4s linear infinite;
}

.pacmoule-logo.compact .logo-shell {
  font-size: 20px;
}

.logo-word {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: #39ff14;
  text-shadow: 0 0 8px #39ff14, 2px 2px 0 #000;
  letter-spacing: 1px;
}

.pacmoule-logo.compact .logo-word {
  font-size: 11px;
}

.baraki-badge {
  display: inline-block;
  background: linear-gradient(90deg, #ffcc00, #ff6600, #ffcc00);
  color: #000;
  font-weight: bold;
  font-size: 11px;
  padding: 3px 10px;
  border: 2px solid #000;
  box-shadow: 2px 2px 0 #000;
  animation: classic-blink 1.6s step-start infinite;
  text-transform: uppercase;
}

.game-branding {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

/* ===== HALL OF FAME ===== */
.hall-of-fame {
  background: #001a00;
  border: 4px ridge #ffcc00;
  padding: 10px;
  margin-bottom: 10px;
  box-shadow: 0 0 12px rgba(255, 204, 0, 0.35);
}

.hall-of-fame h3 {
  text-align: center;
  color: #ffcc00;
  font-size: 14px;
  margin-bottom: 4px;
  text-shadow: 0 0 6px #fc0;
}

.hof-sub {
  text-align: center;
  font-size: 10px;
  color: #aaa;
  margin-bottom: 8px;
}

.hof-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  font-family: 'Press Start 2P', monospace;
}

.hof-table th,
.hof-table td {
  border: 1px solid #446622;
  padding: 4px 3px;
  text-align: center;
  color: #9f9;
}

.hof-table th {
  background: #003300;
  color: #ff0;
  font-size: 8px;
}

.hof-table tr:nth-child(odd) td {
  background: #002200;
}

.hof-table tr:nth-child(even) td {
  background: #001100;
}

/* ===== VICTOIRE ===== */
.victory-overlay {
  z-index: 20;
}

.victory-box {
  max-width: 96%;
  max-height: 95%;
  overflow-y: auto;
}

.victory-box .pacmoule-logo {
  margin: 0 auto 8px;
}

.victory-box .baraki-badge {
  margin-bottom: 12px;
}

.victory-url {
  color: #00ffff;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  margin-bottom: 10px;
}

.victory-card {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 12px;
  border: 3px ridge #ffff00;
  image-rendering: auto;
}

.victory-actions {
  margin-top: 4px;
}

/* ===== PLEIN ÉCRAN ===== */
#gameFrame:fullscreen,
#gameFrame:-webkit-full-screen {
  background: #000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  width: 100%;
  height: 100%;
  padding: 8px;
  box-sizing: border-box;
  overflow: hidden;
  border: none;
  box-shadow: none;
}

#gameFrame:fullscreen .game-hud,
#gameFrame:-webkit-full-screen .game-hud {
  width: min(100%, 720px);
  flex-shrink: 0;
  margin-bottom: 4px;
}

#gameFrame:fullscreen #gameCanvas,
#gameFrame:-webkit-full-screen #gameCanvas {
  /* Taille calculée aussi en JS ; fallback CSS */
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  justify-self: center;
  align-self: center;
  border: 2px solid #39ff14;
}

#gameFrame:fullscreen .game-controls,
#gameFrame:-webkit-full-screen .game-controls {
  width: min(100%, 720px);
  padding-top: 6px;
}

#gameFrame:fullscreen .popup-toggle-panel,
#gameFrame:fullscreen .controls-hint,
#gameFrame:-webkit-full-screen .popup-toggle-panel,
#gameFrame:-webkit-full-screen .controls-hint {
  display: none;
}

#gameFrame:fullscreen .controls-row,
#gameFrame:-webkit-full-screen .controls-row {
  gap: 6px;
}

#gameFrame:fullscreen .kitch-btn.icon-btn,
#gameFrame:-webkit-full-screen .kitch-btn.icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  font-size: 20px;
  padding: 0;
}

#gameFrame:fullscreen .dpad,
#gameFrame:-webkit-full-screen .dpad {
  grid-template-columns: repeat(3, 48px);
  grid-template-rows: repeat(3, 48px);
  gap: 4px;
  margin: 8px auto 0;
}

#gameFrame:fullscreen .dpad-btn,
#gameFrame:-webkit-full-screen .dpad-btn {
  font-size: 16px;
}

#gameFrame:fullscreen .overlay-message,
#gameFrame:-webkit-full-screen .overlay-message {
  position: absolute;
  inset: 0;
}