/* JVGBD Elementor widgets */
.jvgbd-el .jvgbd-filters{display:flex;flex-wrap:wrap;gap:.5rem 1rem;margin-bottom:1rem;justify-content:center;align-items:center}
.jvgbd-el .jvgbd-filters input[type="search"],
.jvgbd-el .jvgbd-filters select{padding:.4rem .6rem;border:1px solid var(--jvgbd-border, #ddd);border-radius:6px;background:var(--jvgbd-surface, #fff);color:var(--jvgbd-text, #111)}
.jvgbd-el .jvgbd-filters button{padding:.45rem .8rem;border:1px solid #0d6efd;border-radius:6px;background:#0d6efd;color:#fff;cursor:pointer}
.jvgbd-el .jvgbd-filters button:hover{background:#0b5ed7;border-color:#0b5ed7}

.jvgbd-el .jvgbd-grid{display:grid;grid-template-columns:repeat(var(--jvgbd-cols,3), minmax(0,1fr));gap:.5rem 1rem}
.jvgbd-el .jvgbd-grid-item{min-width:0}
.jvgbd-el .jvgbd-game-card{color:#fff;min-width:0;overflow:visible;--jvgbd-title-icon-space:1.05em}
.jvgbd-el .jvgbd-game-card .jvgbd-game-title,
.jvgbd-el .jvgbd-game-card .jvgbd-game-title a{color:#fff}
/* Keep title and website icon on one line */
.jvgbd-el .jvgbd-game-card .jvgbd-game-title{display:grid;grid-template-columns:minmax(0, calc(100% - var(--jvgbd-title-icon-space, 1.05em))) var(--jvgbd-title-icon-space, 1.05em);align-items:baseline;column-gap:0}
/* Clamp only the title link, not the website icon */
.jvgbd-el .jvgbd-game-card .jvgbd-game-title > a:not(.jvgbd-title-website){display:-webkit-box;display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-width:0; grid-column:1; /* standard line-clamp fallback */ line-clamp:2; -moz-line-clamp:2}
.jvgbd-el .jvgbd-game-card .jvgbd-game-title,
.jvgbd-el .jvgbd-game-card .jvgbd-game-title a{word-break:break-word;overflow-wrap:anywhere;hyphens:auto;min-width:0}
.jvgbd-el .jvgbd-game-card .jvgbd-game-details{color:#fff}
.jvgbd-el .jvgbd-game-card .jvgbd-game-details .jvgbd-release{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.jvgbd-el .jvgbd-game-card .jvgbd-game-details li{min-width:0}
.jvgbd-el .jvgbd-game-card .jvgbd-game-details{word-break:break-word;overflow-wrap:anywhere;hyphens:auto}
.jvgbd-el .jvgbd-game-card .jvgbd-game-details strong{color:#fff}
.jvgbd-el .jvgbd-game-card .jvgbd-game-title .jvgbd-title-website{display:inline-flex;align-items:center;gap:0;margin-left:0 !important;color:#0d6efd;line-height:1;grid-column:2;justify-self:start}
.jvgbd-el .jvgbd-game-card .jvgbd-game-title .jvgbd-title-website i{width:var(--jvgbd-title-icon-space, 1.1em);display:inline-block}
.jvgbd-el .jvgbd-game-card .jvgbd-game-title .jvgbd-title-website .fas,
.jvgbd-el .jvgbd-game-card .jvgbd-game-title .jvgbd-title-website .fa-solid{color:#0d6efd}
.jvgbd-el .jvgbd-card-user-rating{background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.25)}
.jvgbd-el .jvgbd-alpha{display:flex;flex-wrap:wrap;gap:.25rem .4rem;margin:.5rem 0 1rem;justify-content:center}
.jvgbd-el .jvgbd-alpha .jvgbd-alpha-item{display:inline-block;padding:.25rem .45rem;border:1px solid var(--jvgbd-border, #ddd);border-radius:999px;text-decoration:none;color:var(--jvgbd-text, #111);font-size:.9rem;line-height:1}
.jvgbd-el .jvgbd-alpha .jvgbd-alpha-item.is-active{background:#0d6efd;border-color:#0d6efd;color:#fff}

/* Pagination (directory) */
.jvgbd-el .jvgbd-pagination{display:flex;justify-content:center;gap:.35rem;margin:1rem 0}
.jvgbd-el .jvgbd-pagination .page-numbers{display:inline-block;padding:.35rem .6rem;border:1px solid var(--jvgbd-border, #ddd);border-radius:6px;text-decoration:none;color:var(--jvgbd-text, #111);background:var(--jvgbd-surface, #fff)}
.jvgbd-el .jvgbd-pagination .page-numbers.current{background:#0d6efd;border-color:#0d6efd;color:#fff}
.jvgbd-el .jvgbd-pagination .page-numbers:hover{background:#0b5ed7;border-color:#0b5ed7;color:#fff}

.jvgbd-release-calendar .jvgbd-month{margin:1.25rem 0}
.jvgbd-release-calendar .jvgbd-month-title{margin:.25rem 0 .75rem;font-size:1.2rem;color:var(--jvgbd-text, inherit)}

@media (max-width:900px){
  /* Tablet: 1 column for better readability */
  .jvgbd-el .jvgbd-grid{grid-template-columns:1fr}
}
@media (max-width:600px){
  .jvgbd-el .jvgbd-grid{grid-template-columns:1fr}
  .jvgbd-el .jvgbd-filters{flex-direction:column}
  .jvgbd-el .jvgbd-filters input[type="search"],
  .jvgbd-el .jvgbd-filters select,
  .jvgbd-el .jvgbd-filters button{width:100%}
  /* Slightly smaller release line on mobile */
  .jvgbd-el .jvgbd-game-card .jvgbd-game-details .jvgbd-release{font-size:.92rem}
  .jvgbd-el .jvgbd-game-card .jvgbd-game-details .jvgbd-release strong{font-size:1em}
}

/* Widget-specific tweaks: smaller cover, overlay bottom-right, hide rating/dev/publisher list */
.jvgbd-el .jvgbd-game-card{grid-template-columns:90px 1fr 56px;margin:0}
.jvgbd-el .jvgbd-game-meta{min-width:0}

/* Elementor: hide text when an icon is present unless pending fallback is set */
.jvgbd-platform-badge:not([data-bi-pending]) > svg ~ .jvgbd-platform-text,
.jvgbd-platform-badge:not([data-bi-pending]) > i ~ .jvgbd-platform-text,
.jvgbd-platform-badge:not([data-bi-pending]) > img ~ .jvgbd-platform-text{
  display:none !important;
}
.jvgbd-el .jvgbd-game-thumb{position:relative}
.jvgbd-el .jvgbd-thumb-badge{display:none}
.jvgbd-el .jvgbd-game-details .jvgbd-rating,
.jvgbd-el .jvgbd-game-details .jvgbd-pegi{display:none}

.jvgbd-el .jvgbd-pegi-logo{display:block;align-self:start;justify-self:end}
.jvgbd-el .jvgbd-pegi-logo img{width:48px;height:auto;display:block}
.jvgbd-el .jvgbd-pegi-fallback{font-size:.8rem;color:#555}
.jvgbd-el .jvgbd-card-platforms{max-width:100%}

/* Jeux du moment / Trending widget styles */
.jvgbd-trending-widget{font-family:inherit}
.jvgbd-trending-widget .jvgbd-hype-widget-title{margin-bottom:.6rem}
.jvgbd-trending-widget .jvgbd-trending-first{display:block;position:relative;border-radius:6px;overflow:hidden;margin-bottom:.5rem;height:56px}
.jvgbd-trending-first .jvgbd-hype-hero-overlay{background:linear-gradient(90deg, rgba(255,150,0,0.95), rgba(0,0,0,0.15));padding:.45rem .75rem}
.jvgbd-trending-first .jvgbd-hype-hero-title{color:#111;font-weight:700}
.jvgbd-trending-first .jvgbd-hype-hero-count{background:transparent;color:#fff}

.jvgbd-trending-widget .jvgbd-hype-item{display:block;text-decoration:none;color:inherit}
.jvgbd-trending-widget .jvgbd-hype-link{display:flex;align-items:center;gap:.75rem;padding:.4rem .5rem;border-radius:4px}
.jvgbd-trending-widget .jvgbd-hype-rank{width:36px;flex:0 0 36px;text-align:center;color:#ff6a00;font-weight:700}
.jvgbd-trending-widget .jvgbd-hype-thumb{width:64px;height:40px;background-size:cover;background-position:center;border-radius:4px;flex:0 0 64px}
.jvgbd-trending-widget .jvgbd-hype-body{flex:1 1 auto;min-width:0}
.jvgbd-trending-widget .jvgbd-hype-title{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.jvgbd-trending-widget .jvgbd-hype-count{flex:0 0 56px;text-align:right;color:var(--jvgbd-muted)}

@media (max-width:600px){
  .jvgbd-trending-widget .jvgbd-hype-link{gap:.5rem;padding:.3rem .4rem}
  .jvgbd-trending-widget .jvgbd-hype-thumb{width:48px;height:32px;flex:0 0 48px}
  .jvgbd-trending-widget .jvgbd-hype-rank{width:30px}
}

/* Force PEGI to the top-right of the card (all small layouts) */
.jvgbd-el .jvgbd-game-card{position:relative}
.jvgbd-el .jvgbd-game-card .jvgbd-pegi-logo{position:absolute !important; right:8px; top:8px; left:auto; bottom:auto; z-index:10; margin:0}
.jvgbd-el .jvgbd-game-card{padding-right:56px}

/* Pin PEGI at top-right on small screens */
@media (max-width:900px){
  .jvgbd-el .jvgbd-game-card{position:relative; padding-right:56px}
  .jvgbd-el .jvgbd-pegi-logo{position:absolute; right:8px; top:8px; z-index:10; margin:0}
}
@media (max-width:540px){
  .jvgbd-el .jvgbd-game-card{grid-template-columns:72px 1fr}
  .jvgbd-el .jvgbd-pegi-logo img{width:40px;height:auto}
}
@media (max-width:480px) and (orientation: portrait){
  .jvgbd-el .jvgbd-game-card{padding-right:64px}
  .jvgbd-el .jvgbd-pegi-logo{right:6px; top:6px}
  .jvgbd-el .jvgbd-pegi-logo img{width:36px}
}
.jvgbd-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.jvgbd-el .jvgbd-website .fa-solid,
.jvgbd-el .jvgbd-website .fas{font-size:1rem;color:#0a7}
.jvgbd-el .jvgbd-website .jvgbd-icon-link{display:inline-flex;align-items:center;gap:.25rem}

/* Ensure tooltips show on hover/focus inside Elementor even when JS toggles classes */
.jvgbd-el .jvgbd-platform-badge:hover .jvgbd-tooltip,
.jvgbd-el .jvgbd-platform-badge:focus-within .jvgbd-tooltip{opacity:1;transform:translateX(-50%) translateY(0)}

/* Fallback for platform icons inside Elementor widgets: show text when icons are pending */
.jvgbd-el .jvgbd-platform-badge[data-bi-pending] .jvgbd-platform-text{display:inline !important}
.jvgbd-el .jvgbd-platform-badge[data-bi-pending] i,
.jvgbd-el .jvgbd-platform-badge[data-bi-pending] .bi,
.jvgbd-el .jvgbd-platform-badge[data-bi-pending] img{visibility:hidden}

/* Latest Games widget tweaks */
.jvgbd-latest-games .jvgbd-widget-title{margin-bottom:.75rem;font-size:1.1rem}
.jvgbd-latest-games .jvgbd-grid{gap:.6rem .8rem}
.jvgbd-latest-list{display:flex;flex-direction:column;gap:.5rem}
.jvgbd-latest-list-item .jvgbd-game-card{margin:0;padding:.6rem}
.jvgbd-latest-games .jvgbd-grid-item .jvgbd-game-card{margin:0}

.jvgbd-latest-games .jvgbd-game-excerpt{color:var(--jvgbd-muted,#666);font-size:.95rem;margin-top:.5rem}
.jvgbd-latest-games .jvgbd-latest-list-item .jvgbd-game-excerpt{margin-left:8px}


