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: 1320px;
  max-width: 97vw;

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

@media (max-width: 900px){
  .wrap{
    width: 100%;
    max-width: 100%;
    padding: 14px;
  }
  .cardInner{
    padding: 16px;
  }
}

.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: 18px 20px 20px 20px;
}

.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;
}


/* ✅ Boutons de liens figés sur la page jeu (indépendants du thème)
   - Garde l'effet F95 blanc/rouge
   - Garde Discord / MEGA / autres hosts fixes
   - Ne touche pas à Archives de la traduction
*/
.btnLike .f95-white,
#btnF95 .f95-white{
  color:#ffffff !important;
  font-weight:800;
}
.btnLike .f95-red,
#btnF95 .f95-red{
  color:#8b2d2d !important;
  font-weight:800;
}

.btnLike.btn-f95,
#btnF95.btn-f95,
.btnLike.btn-discord,
#btnDiscord.btn-discord,
.btnLike.btnMega,
#btnMega,
.btnLike.btn-host-drive,
.btnLike.btn-host-gofile,
.btnLike.btn-host-default{
  color:#ffffff !important;
}

.btnLike.btn-host-drive{
  background: linear-gradient(180deg,#1a73e8 0%,#1558b0 100%) !important;
  border: 1px solid rgba(255,255,255,.04) !important;
  color:#ffffff !important;
}
.btnLike.btn-host-drive:hover{
  background: linear-gradient(180deg,#2a7ff0 0%,#1b63c2 100%) !important;
  border-color: rgba(255,255,255,.04) !important;
}

.btnLike.btn-host-gofile{
  background: linear-gradient(180deg,#2e7d32 0%,#1b5e20 100%) !important;
  border: 1px solid rgba(255,255,255,.04) !important;
  color:#ffffff !important;
}
.btnLike.btn-host-gofile:hover{
  background: linear-gradient(180deg,#388e3c 0%,#236f28 100%) !important;
  border-color: rgba(255,255,255,.04) !important;
}

.btnLike.btn-host-default{
  background: rgba(255,255,255,0.06) !important;
  border: 1px solid rgba(255,255,255,.16) !important;
  color:#ffffff !important;
}
.btnLike.btn-host-default:hover{
  background: rgba(255,255,255,0.09) !important;
  border-color: rgba(255,255,255,.18) !important;
}

.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: 1120px;
  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):not(.btn-host-drive):not(.btn-host-gofile):not(.btn-host-default),
html[data-theme="clair"] .btnLike:not(.btn-f95):not(.btnMega):not(.btn-discord):not(.btn-host-drive):not(.btn-host-gofile):not(.btn-host-default),
html[data-theme="light"] .btnLike:not(.btn-f95):not(.btnMega):not(.btn-discord):not(.btn-host-drive):not(.btn-host-gofile):not(.btn-host-default),
:root[data-theme="white"] .btnLike:not(.btn-f95):not(.btnMega):not(.btn-discord):not(.btn-host-drive):not(.btn-host-gofile):not(.btn-host-default),
:root[data-theme="clair"] .btnLike:not(.btn-f95):not(.btnMega):not(.btn-discord):not(.btn-host-drive):not(.btn-host-gofile):not(.btn-host-default),
:root[data-theme="light"] .btnLike:not(.btn-f95):not(.btnMega):not(.btn-discord):not(.btn-host-drive):not(.btn-host-gofile):not(.btn-host-default){
  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):not(.btn-host-drive):not(.btn-host-gofile):not(.btn-host-default){
    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.15);
  border: 1px solid rgba(34, 197, 94, 0.32);
  color: #1faa59;
  font-weight: 600;
}

.badge.status-outdated{
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.32);
  color: #ff8080;
  font-weight: 600;
}


/* ===== Layout v6.1 : colonne traduction à droite, recommandations en bas ===== */
.wrap{
  width:min(1480px, calc(100vw - 34px));
}

.gameTopLayout{
  display:grid;
  grid-template-columns:minmax(0, 1.95fr) 360px;
  gap:18px;
  align-items:start;
}

.gameMainColumn{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.gameSidePanel{
  display:flex;
  flex-direction:column;
  gap:14px;
  position:sticky;
  top:18px;
}

.gameSidePanel > .infoBlock{
  margin-top:0;
}

.gameActionsCard{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:12px;
  overflow:hidden;
}

.sideAccent{
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  border-radius:14px;
  background:linear-gradient(180deg, rgba(92, 175, 255, .95), rgba(156, 104, 255, .85));
  opacity:.9;
}

.gameActionsCard h3,
#ratingBox h3,
#statsOut h3,
#notesBox h3{
  margin-bottom:8px;
}

.sideIntro{
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
  margin-top:-2px;
}

.btnRowSide,
.btnMainRowSide{
  margin-top:0;
}

.btnRowSide{
  justify-content:stretch;
}

.btnRowSide .btnLike,
.btnMainRowSide .btnLike,
#archiveBox .btnLike,
.btnMainRowSide > a,
.btnMainRowSide .extraLinksCol > a{
  width:100%;
  max-width:none;
  box-sizing:border-box;
  justify-content:center;
}

#btnMega{
  width:100% !important;
  max-width:none !important;
}

.btnRowSide .btnLike{
  flex:1 1 100%;
}

.btnMainRowSide{
  align-items:stretch !important;
}

.btnMainRowSide .extraLinksCol{
  width:100% !important;
  align-items:stretch !important;
}

.btnMainRowSide .extraLinksCol .btnLike{
  margin:0 !important;
}

/* Centre proprement les retours à la ligne dans translationsExtra */
.btnMainRowSide .extraLinkBtn{
  text-align:center;
  white-space:pre-line;
  line-height:1.35;
}

.quickAutoTile .quickAutoTitleRow,
.quickAutoTile .quickAutoSub{
  white-space:pre-line;
}


#archiveBox{
  margin-top:0 !important;
}

#archiveBox .btnLike,
.translationAboutInline{
  margin-top:0;
}
.translationAboutInline{
  margin-top:0;
  padding:12px 14px;
  border-top:0;
  border:1px solid rgba(255,255,255,.08);
  border-radius:14px;
  background:linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.018));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}

.translationAboutInline .infoTextMuted{
  line-height:1.5;
  margin:0;
}

.translationSideCard{
  margin-top:0;
}

.translationRatingCard{
  padding-top:12px;
  padding-bottom:12px;
  justify-content:flex-start;
  gap:8px;
}

.ratingSummary{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-bottom:2px;
  color:var(--muted);
  font-size:13px;
  flex-wrap:wrap;
}

.ratingSummary strong{
  color:var(--fg);
  font-size:20px;
  line-height:1;
}

.ratingSummaryLabel{
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:11px;
  opacity:.85;
}

.ratingVotes{
  font-size:12px;
}

#ratingChoices{
  flex-wrap:wrap !important;
}

.statsUnderMain{
  margin-top:0;
  padding:12px 14px;
}

.statsUnderMain h3{
  display:none;
}

.statsUnderMain .statsLine{
  justify-content:flex-start;
  gap:10px 12px;
}

.statsUnderMain .statsItem{
  padding:8px 10px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:10px;
  background:rgba(255,255,255,.03);
}

.statsUnderMain strong{
  margin-left:2px;
}

.similarGamesBlock{
  margin-top:18px;
}

@media (max-width: 1260px){
  .wrap{
    width:min(1390px, calc(100vw - 24px));
  }
  .gameTopLayout{
    grid-template-columns:minmax(0,1fr) 340px;
  }
}

@media (max-width: 980px){
  .gameTopLayout{
    grid-template-columns:1fr;
  }

  .gameSidePanel{
    position:static;
    top:auto;
  }

  .statsUnderMain .statsLine{
    justify-content:center;
  }
}


.translationLikeCard{
  padding-top:12px;
  padding-bottom:14px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}

.likeIntro{
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
  max-width:260px;
  margin:0 auto;
}

.sideLikeBtn{
  min-width: 210px;
  padding: 6px 16px;
  font-size: 16px;
  font-weight: 800;
  color:#555;
}

.sideLikeBtn:hover,
.sideLikeBtn:focus-visible{
  color:#ffd54a;
}

.sideLikeBtn .likeIconSvg{
  width:20px;
  height:20px;
  display:block;
  flex:0 0 auto;
}
.sideLikeBtn .likeIconSvg path{
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.sideLikeBtn .likeIconSvg--liked path{
  fill:#ffd54a;
  stroke:#ffd54a;
}
.quickAutoTile{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:8px;
  width:100%;
  max-width:100%;
  padding:12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.018));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
  box-sizing:border-box;
}
.quickAutoTile .quickAutoTitleRow{
  display:block;
  width:100%;
  text-align:center;
  font-size:13px;
  font-weight:800;
  letter-spacing:.01em;
  text-transform:none;
  color:var(--fg);
}
.quickAutoTile .btnLike{
  width:100%;
  max-width:none;
  margin:0 !important;
  box-sizing:border-box;
  justify-content:center;
}
.quickAutoTile .quickAutoSub{
  display:block;
  width:100%;
  text-align:center;
  font-size:12px;
  font-weight:600;
  line-height:1.35;
  color:var(--muted);
}

/* ===== Watchlist ===== */
.translationWatchlistCard {
  position: relative;
}
.sideWatchlistBtn {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
  font-weight: 900;
}
.sideWatchlistBtn.is-in-watchlist {
  background: rgba(74, 222, 128, .16);
  border-color: rgba(74, 222, 128, .35);
}
.sideWatchlistBtn[disabled] {
  opacity: .65;
  cursor: wait;
}
.watchlistMsg {
  min-height: 18px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.watchlistMsg.ok { color: #7ff0a0; }
.watchlistMsg.err { color: #ff9b9b; }


/* ===== Placement et icône Watchlist ===== */
.gameActionsCard{ order:1; }
.translationWatchlistCard{ order:2; }
.translationLikeCard{ order:3; }
.translationRatingCard{ order:4; }

.watchlistBookmarkIcon{
  display:inline-flex;
  width:24px;
  height:24px;
  align-items:center;
  justify-content:center;
  transform:translateY(1px);
  flex:0 0 auto;
}
.watchlistBookmarkIcon svg{
  width:24px;
  height:24px;
  display:block;
  overflow:visible;
}

.translationWatchlistCard h3{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
}


/* ===== Ajustement Watchlist : moins d’espace sous le bouton ===== */
.translationWatchlistCard{
  padding-top: 12px !important;
  padding-bottom: 10px !important;
  gap: 8px !important;
}

.translationWatchlistCard h3{
  margin-bottom: 4px !important;
}

.translationWatchlistCard .likeIntro{
  margin: 0 0 8px !important;
  line-height: 1.35;
}

.sideWatchlistBtn{
  margin-top: 6px !important;
  margin-bottom: 0 !important;
}

.watchlistMsg{
  min-height: 0 !important;
  margin-top: 0 !important;
}

.watchlistMsg:empty{
  display: none !important;
}

.watchlistMsg:not(:empty){
  display: block !important;
  margin-top: 6px !important;
}

/* ===== Watchlist compact : phrase supprimée ===== */
#watchlistIntro,
.translationWatchlistCard .likeIntro{
  display:none !important;
}

.translationWatchlistCard{
  padding-top:12px !important;
  padding-bottom:12px !important;
}

.translationWatchlistCard h3{
  margin:0 0 10px !important;
}

.sideWatchlistBtn{
  margin-top:0 !important;
  margin-bottom:0 !important;
}

.watchlistMsg:empty{
  display:none !important;
}
