body.mode-game{
  margin:0;
  min-height:100dvh;    /* mieux que 100% / 100vh */
  overflow-y: visible;  /* IMPORTANT: pas de scroll interne */
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding: 18px 0;
}

/* ✅ Reset en mode viewer (évite que le CSS de la page jeu décale les tuiles) */
body:not(.mode-game){
  display:block;
  padding:0;
  min-height:100vh;
  overflow-y:auto;
}


/* ✅ NE DOIT PAS SCROLLER */
.wrap{
  width: 820px;
  max-width: 92vw;

  height: auto;         /* important */
  overflow: visible;    /* important */
  padding: 18px;        /* garde ton padding */
}

.cardPreview{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow:hidden;
  box-shadow: 0 10px 40px rgba(0,0,0,.35);
}

.cardInner{
  padding: 16px 16px 18px 16px;
}

.headRow{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
  flex-wrap:wrap;
}

.badgesRow{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  margin:0;
}

.hamburger-btn{
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.05);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  user-select:none;
  flex:0 0 auto;
}
.hamburger-btn:hover{ filter: brightness(1.10); }
.hamburger-btn:active{ transform: translateY(1px); }

.ham-lines{
  width:16px;
  height:12px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.ham-lines span{
  display:block;
  height:2px;
  border-radius:999px;
  background:#ffffff;
  opacity:0.92;
}

.menu-popover{
  position:fixed;
  z-index:2000;
  min-width: 220px;
  background: var(--popover-bg);
  border:1px solid var(--border);
  border-radius:12px;
  box-shadow: 0 18px 45px rgba(0,0,0,.45);
  padding:6px;
}
.menu-popover.hidden{ display:none !important; }

.menu-item{
  width:100%;
  text-align:left;
  padding:10px 10px;
  border-radius:10px;
  border:1px solid transparent;
  background: transparent;
  color: var(--fg);
  cursor:pointer;
  font-weight:700;
}
.menu-item:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.06);
}

.modal-overlay{
  position:fixed;
  inset:0;
  z-index:3000;
  background: rgba(0,0,0,0.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}
.modal-overlay.hidden{ display:none !important; }

.modal{
  width: 680px;
  max-width: 92vw;
  background: var(--card);
  border:1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 55px rgba(0,0,0,.55);
  overflow:hidden;
}

.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.02);
}
.modal-title{
  font-weight: 900;
  color:#fff;
}
.modal-close{
  width:32px;
  height:32px;
  border-radius:10px;
  border:1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color: var(--fg);
  cursor:pointer;
}
.modal-close:hover{ filter: brightness(1.10); }

.modal-body{
  padding: 14px;
  color: var(--fg);
  font-size: 14px;
  line-height: 1.45;
}
.aboutText a{
  color: var(--primary);
  text-decoration:none;
}
.aboutText a:hover{ text-decoration:underline; }

.modal-foot{
  padding: 12px 14px 14px;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.modal-btn{
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color:#fff;
  font-weight:800;
  cursor:pointer;
  user-select:none;
}
.modal-btn:hover{ filter: brightness(1.08); }

.majState{
  margin-top: -2px;
  margin-bottom: 8px;
  text-align: left;
  font-size: 13px;
  color: var(--muted);
  user-select:none;
}
.majState .ok{ color:#4ade80; font-weight:800; }
.majState .no{ color:#f97316; font-weight:800; }
.majState .wait{ color:#cbd5e1; font-weight:700; }

.title{
  margin: 0 0 12px 0;
  font-size: 22px;
  line-height: 1.2;
  color: #fff;
}


.coverGallery{ margin-bottom: 0; }
.coverStage{
  position:relative;
  border-radius:14px;
  overflow:hidden;
  background:#0f121a;
  border:1px solid var(--border);
}
.cover{
  width:100%;
  height: 230px;
  border-radius: 0;
  border: 0;
  background: #0f121a;
  object-fit: cover;
  object-position: center 30%;
  display:block;
}
.coverCtrl{
  position:absolute;
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(0,0,0,.55);
  color:#fff;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  z-index:5;
  user-select:none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.coverCtrl:hover{ background:rgba(0,0,0,.72); }
.coverCtrl .galarr{ width:14px; height:14px; display:block; }
.coverExpand{ top:12px; right:12px; }
.coverPrev{ left:12px; top:50%; transform:translateY(-50%); }
.coverNext{ right:12px; top:50%; transform:translateY(-50%); }
.coverCount{
  position:absolute;
  bottom:12px;
  right:12px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.18);
  font-size:12px;
  color:#fff;
  line-height:1;
  user-select:none;
  z-index:4;
}
.coverLightbox.hidden{ display:none !important; }
.coverLightbox{
  --lb-bg:none;
  position:fixed;
  inset:0;
  z-index:4000;
  overflow:hidden;
}
.coverLightbox::before{
  content:none;
}
.coverLightboxBackdrop{
  position:absolute;
  inset:0;
  background:
    radial-gradient(1200px 700px at 50% 50%, rgba(255,255,255,.05), rgba(0,0,0,0) 60%),
    var(--overlay-bg, rgba(6,10,18,.80));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.coverLightboxDialog{
  position:relative;
  z-index:1;
  width:min(96vw, 1500px);
  height:min(92vh, 980px);
  margin:4vh auto;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;
  border-radius:24px;
  border:1px solid var(--border, rgba(255,255,255,.10));
  background:color-mix(in srgb, var(--card, #171b29) 88%, transparent);
  box-shadow:0 24px 80px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.05);
}
.coverLightboxImg{
  display:block;
  width:auto;
  height:auto;
  max-width:calc(100% - 120px);
  max-height:calc(100% - 72px);
  object-fit:contain;
  object-position:center center;
  border-radius:18px;
  box-shadow:0 20px 60px rgba(0,0,0,.40);
}
.coverLightboxClose,
.coverLightboxPrev,
.coverLightboxNext{
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  background:color-mix(in srgb, var(--btn, rgba(0,0,0,.55)) 86%, transparent);
  border:1px solid var(--border, rgba(255,255,255,.22));
  color:var(--fg, #fff);
}
.coverLightboxClose:hover,
.coverLightboxPrev:hover,
.coverLightboxNext:hover{
  background:color-mix(in srgb, var(--hover-bg, rgba(255,255,255,.10)) 88%, var(--btn, rgba(0,0,0,.55)));
  border-color:var(--border-soft, var(--border, rgba(255,255,255,.32)));
}
.coverLightboxClose{ top:12px; right:12px; }
.coverLightboxPrev{ left:16px; }
.coverLightboxNext{ right:16px; }
.coverLightboxCount{
  bottom:12px;
  right:12px;
  background:color-mix(in srgb, var(--btn, rgba(0,0,0,.55)) 88%, transparent);
  border:1px solid var(--border, rgba(255,255,255,.18));
  color:var(--fg, #fff);
}
@media (max-width: 640px){
  .coverLightboxDialog{
    width:min(98vw, 1500px);
    height:min(94vh, 980px);
    margin:3vh auto;
    padding:16px;
    border-radius:18px;
  }
  .coverLightboxImg{
    max-width:calc(100% - 84px);
    max-height:calc(100% - 64px);
  }
  .coverLightboxPrev,
  .coverLightboxNext{ width:38px; height:38px; }
}

.cover.is-placeholder{
  background:
    radial-gradient(1200px 300px at 20% 0%, rgba(255,255,255,0.06), rgba(0,0,0,0)),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0));
}

.tagsRow{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top: 12px;
}

.tagPill{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color:#fff;
  border-radius: 999px;
  font-size: 12px;
  padding: 6px 10px;
  user-select:none;
}

.btnRow{
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
  margin-top: 16px;
}

.btnMainRow{
  display:flex;
  justify-content:center;
  margin-top: 12px;
}

.btnLike{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  color:#fff;
  text-decoration:none;
  font-weight: 700;
  cursor:pointer;
  user-select:none;
}
.btnLike:hover{ filter: brightness(1.08); }

#btnDiscord.btn-discord{
  background:#5865F2;
  border-color:#5865F2;
  color:#fff;
}
#btnDiscord.btn-discord:hover{
  background:#4752C4;
  border-color:#4752C4;
}

.btnLike .f95-white{ color:#ffffff; font-weight:800; }
.btnLike .f95-red{ color:#8b2d2d; font-weight:800; }

.btnLike.btn-f95,
#btnF95.btn-f95{
  position: relative;
  background: linear-gradient(180deg, #222222 0%, #161616 100%);
  border-color: rgba(255,255,255,.04);
  color:#ffffff;
  box-shadow: 0 8px 18px rgba(0,0,0,.35);
  overflow: hidden;
  transform: none;
}

.btnLike.btn-f95 span,
#btnF95.btn-f95 span{
  position: relative;
  z-index: 1;
}

.btnLike.btn-f95::before,
#btnF95.btn-f95::before{
  content: none !important;
  display: none !important;
}

.btnLike.btn-f95:hover,
#btnF95.btn-f95:hover{
  background: linear-gradient(180deg, #1a1a1a 0%, #111111 100%);
  border-color: rgba(255,255,255,.04);
  transform: none;
}

.btnLike.btnMega,
#btnMega{
  background: linear-gradient(180deg,#b71c1c 0%,#8e0e0e 100%);
  border: 1px solid rgba(255,255,255,.04);
  color:#ffffff;
  box-shadow: 0 8px 18px rgba(0,0,0,.40);
  transform: none;
}

.btnLike.btnMega:hover,
#btnMega:hover{
  background: linear-gradient(180deg,#c62828 0%,#9f1b1b 100%);
  border-color: rgba(255,255,255,.04);
  transform: none;
}

.ratingStar,
.ratingCancel{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 40px;
  height: 34px;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 26px;
  line-height: 1;

  /* ✅ IMPORTANT : on suit le thème */
  color: var(--game-rating-color, #ffd36b);
  opacity: var(--game-rating-opacity, 0.7);
}

.ratingStar:hover,
.ratingCancel:hover,
.ratingStar:focus-visible,
.ratingCancel:focus-visible{
  opacity: 0.92;
  filter: brightness(1.04);
  transform: scale(1.02);
}

.ratingCancel{
  font-size: 16px;
  color: #fff;
  opacity: 0.75;
}

.ratingCancel:hover{
  color: #ff9a9a;
  opacity: 0.95;
}

#ratingChoices{ flex-wrap: nowrap; }

#ratingMsg{
  opacity: 0.82;
  transition: opacity 220ms cubic-bezier(.4,0,.2,1);
  will-change: opacity;
}
@keyframes ratingMsgFade {
  from { opacity: 0.35; }
  to   { opacity: 0.82; }
}
#ratingMsg.msgFade{
  animation: ratingMsgFade 520ms cubic-bezier(.4,0,.2,1);
}

.statsOut{
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: 12px;
  display:grid;
  gap:6px;
  justify-items:center;
  user-select:none;
}
.statsLine{
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
}
.statsLineSub{
  opacity: .96;
}
.statsItem{
  display:inline-flex;
  align-items:center;
  gap:4px;
}
.statsOut strong{
  color: var(--fg);
  font-weight: 800;
}

.err{
  margin: 14px auto 0;
  max-width: 820px;
  color: #ffd6d6;
  background: rgba(255, 0, 0, 0.08);
  border: 1px solid rgba(255, 0, 0, 0.2);
  padding: 12px 14px;
  border-radius: 12px;
  display:none;
  white-space: pre-wrap;
}

/* cacher la barre UNIQUEMENT dans la page jeu */
body.mode-game .topbar{
  display:none !important;
}

.infoBlock{
  margin-top: 12px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(0,0,0,.15);
}
.infoBlock h3{ margin: 0 0 6px 0; }
.infoBlock .infoText{
  color: var(--fg);
  font-size: 14px;
  line-height: 1.45;
}
.infoBlock .infoTextMuted{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

/* =========================================================
   ✅ FIX LISIBILITÉ EN CLAIR (white/clair/light + AUTO système)
   - Ne change PAS le layout
   - Corrige : title / tags / boutons / hamburger / menu popover / modal / rating cancel / infoBlock
   ========================================================= */

/* Thèmes clairs explicites (selon où est le data-theme) */
html[data-theme="white"], html[data-theme="clair"], html[data-theme="light"],
:root[data-theme="white"], :root[data-theme="clair"], :root[data-theme="light"]{
  /* rien : on cible les éléments ci-dessous */
}

html[data-theme="white"] .title,
html[data-theme="clair"] .title,
html[data-theme="light"] .title,
:root[data-theme="white"] .title,
:root[data-theme="clair"] .title,
:root[data-theme="light"] .title{
  color: var(--title, var(--fg)) !important;
}

html[data-theme="white"] .tagPill,
html[data-theme="clair"] .tagPill,
html[data-theme="light"] .tagPill,
:root[data-theme="white"] .tagPill,
:root[data-theme="clair"] .tagPill,
:root[data-theme="light"] .tagPill{
  color: var(--fg) !important;
  background: var(--thumb-bg, rgba(0,0,0,0.06)) !important;
  border-color: var(--border) !important;
}

/* Boutons neutres (laisser F95/MEGA/Discord) */
html[data-theme="white"] .btnLike:not(.btn-f95):not(.btnMega):not(.btn-discord),
html[data-theme="clair"] .btnLike:not(.btn-f95):not(.btnMega):not(.btn-discord),
html[data-theme="light"] .btnLike:not(.btn-f95):not(.btnMega):not(.btn-discord),
:root[data-theme="white"] .btnLike:not(.btn-f95):not(.btnMega):not(.btn-discord),
:root[data-theme="clair"] .btnLike:not(.btn-f95):not(.btnMega):not(.btn-discord),
:root[data-theme="light"] .btnLike:not(.btn-f95):not(.btnMega):not(.btn-discord){
  color: var(--fg) !important;
  background: var(--btn, rgba(0,0,0,0.06)) !important;
  border-color: var(--border) !important;
}

/* Hamburger visible */
html[data-theme="white"] .ham-lines span,
html[data-theme="clair"] .ham-lines span,
html[data-theme="light"] .ham-lines span,
:root[data-theme="white"] .ham-lines span,
:root[data-theme="clair"] .ham-lines span,
:root[data-theme="light"] .ham-lines span{
  background: var(--fg) !important;
}

/* Popover lisible en clair */
html[data-theme="white"] .menu-popover,
html[data-theme="clair"] .menu-popover,
html[data-theme="light"] .menu-popover,
:root[data-theme="white"] .menu-popover,
:root[data-theme="clair"] .menu-popover,
:root[data-theme="light"] .menu-popover{
  background: var(--popover-bg, rgba(255,255,255,0.92)) !important;
  border-color: var(--border) !important;
}

html[data-theme="white"] .menu-item:hover,
html[data-theme="clair"] .menu-item:hover,
html[data-theme="light"] .menu-item:hover,
:root[data-theme="white"] .menu-item:hover,
:root[data-theme="clair"] .menu-item:hover,
:root[data-theme="light"] .menu-item:hover{
  background: var(--hover-bg, rgba(0,0,0,0.06)) !important;
  border-color: var(--border-soft, rgba(0,0,0,0.10)) !important;
}

/* Modal lisible */
html[data-theme="white"] .modal-title,
html[data-theme="clair"] .modal-title,
html[data-theme="light"] .modal-title,
:root[data-theme="white"] .modal-title,
:root[data-theme="clair"] .modal-title,
:root[data-theme="light"] .modal-title{
  color: var(--title, var(--fg)) !important;
}

html[data-theme="white"] .modal-btn,
html[data-theme="clair"] .modal-btn,
html[data-theme="light"] .modal-btn,
:root[data-theme="white"] .modal-btn,
:root[data-theme="clair"] .modal-btn,
:root[data-theme="light"] .modal-btn{
  color: var(--fg) !important;
  background: var(--btn, rgba(0,0,0,0.06)) !important;
  border-color: var(--border) !important;
}

/* Rating cancel visible */
html[data-theme="white"] .ratingCancel,
html[data-theme="clair"] .ratingCancel,
html[data-theme="light"] .ratingCancel,
:root[data-theme="white"] .ratingCancel,
:root[data-theme="clair"] .ratingCancel,
:root[data-theme="light"] .ratingCancel{
  color: var(--muted, var(--fg)) !important;
}

/* Info block lisible */
html[data-theme="white"] .infoBlock,
html[data-theme="clair"] .infoBlock,
html[data-theme="light"] .infoBlock,
:root[data-theme="white"] .infoBlock,
:root[data-theme="clair"] .infoBlock,
:root[data-theme="light"] .infoBlock{
  border-color: var(--border) !important;
  background: var(--panel, rgba(0,0,0,0.04)) !important;
}

/* ===== AUTO système (pas de data-theme) ===== */
@media (prefers-color-scheme: light){
  html:not([data-theme]) .title{ color: var(--title, var(--fg)) !important; }

  html:not([data-theme]) .tagPill{
    color: var(--fg) !important;
    background: var(--thumb-bg, rgba(0,0,0,0.06)) !important;
    border-color: var(--border) !important;
  }

  html:not([data-theme]) .btnLike:not(.btn-f95):not(.btnMega):not(.btn-discord){
    color: var(--fg) !important;
    background: var(--btn, rgba(0,0,0,0.06)) !important;
    border-color: var(--border) !important;
  }

  html:not([data-theme]) .ham-lines span{ background: var(--fg) !important; }

  html:not([data-theme]) .menu-popover{
    background: var(--popover-bg, rgba(255,255,255,0.92)) !important;
    border-color: var(--border) !important;
  }
  html:not([data-theme]) .menu-item:hover{
    background: var(--hover-bg, rgba(0,0,0,0.06)) !important;
    border-color: var(--border-soft, rgba(0,0,0,0.10)) !important;
  }

  html:not([data-theme]) .modal-title{ color: var(--title, var(--fg)) !important; }
  html:not([data-theme]) .modal-btn{
    color: var(--fg) !important;
    background: var(--btn, rgba(0,0,0,0.06)) !important;
    border-color: var(--border) !important;
  }

  html:not([data-theme]) .ratingCancel{ color: var(--muted, var(--fg)) !important; }

  html:not([data-theme]) .infoBlock{
    border-color: var(--border) !important;
    background: var(--panel, rgba(0,0,0,0.04)) !important;
  }
}

/* ✅ Lisibilité bloc ℹ️ Informations (infoBlock) */

/* 1) Thème clair explicite */
html[data-theme="white"] .infoBlock,
html[data-theme="clair"] .infoBlock,
html[data-theme="light"] .infoBlock{
  background:#f4f6f8 !important;
  border-color:#d6dbe1 !important;
}

html[data-theme="white"] .infoBlock h3,
html[data-theme="clair"] .infoBlock h3,
html[data-theme="light"] .infoBlock h3{
  color:#111 !important;
  opacity:1 !important;
}

html[data-theme="white"] .infoBlock .infoText,
html[data-theme="clair"] .infoBlock .infoText,
html[data-theme="light"] .infoBlock .infoText{
  color:#222 !important;
  opacity:1 !important;
}

html[data-theme="white"] .infoBlock .infoTextMuted,
html[data-theme="clair"] .infoBlock .infoTextMuted,
html[data-theme="light"] .infoBlock .infoTextMuted{
  color:#555 !important;
  opacity:1 !important;
}

/* 2) Mode auto (pas de data-theme) + système en clair */
@media (prefers-color-scheme: light){
  html:not([data-theme]) .infoBlock{
    background:#f4f6f8 !important;
    border-color:#d6dbe1 !important;
  }
  html:not([data-theme]) .infoBlock h3{ color:#111 !important; opacity:1 !important; }
  html:not([data-theme]) .infoBlock .infoText{ color:#222 !important; opacity:1 !important; }
  html:not([data-theme]) .infoBlock .infoTextMuted{ color:#555 !important; opacity:1 !important; }
}


/* ✅ hover léger MAIS fixe (pas de surélévation) */
#ratingBox:hover{
  border-color: #555 !important;
}


#mainInfoBox,
.tagsBox,
.game-block,
#notesBox{
  transition: transform .14s ease, box-shadow .14s ease;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}

#mainInfoBox:hover,
.tagsBox:hover,
.game-block:hover,
#notesBox:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.45);
}

.badge.status-updated{
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #b8f7c9;
}

.badge.status-outdated{
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #ffb4b4;
}

