/*
 * Fiches de jeux individuelles (single posts, hors page TOP /jeux-porno-ia/).
 * Transforme l'en-tête GP Element en hero cinématique et harmonise l'encadré
 * auteur + commentaires avec la colonne de lecture.
 * Chargée après refonte.css. CSS uniquement : markup, contenu et headings
 * inchangés (le titre reste le H2 du GP Element). Cible les hash de blocs
 * GenerateBlocks, identiques sur les 26 fiches.
 *
 * Tout est scopé `body.single-post:not(.postid-1201)` pour ne jamais toucher
 * la page TOP (qui a son propre template).
 */

/* ==========================================================================
   1. Image à la une → hero cinématique full-bleed
   ========================================================================== */
body.single-post:not(.postid-1201) figure.gb-block-image-a1eaa992 {
  position: relative;
  margin: 0;
  line-height: 0;
}

body.single-post:not(.postid-1201) figure.gb-block-image-a1eaa992 img {
  width: 100%;
  height: clamp(340px, 44vh, 520px);
  object-fit: cover;
  object-position: center 28%;
  border: 0;
  border-radius: 0;
}

/* Voile dégradé : assombrit le bas pour fondre vers le header card */
body.single-post:not(.postid-1201) figure.gb-block-image-a1eaa992::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 10, 19, 0) 30%, rgba(10, 10, 19, 0.55) 78%, rgba(10, 10, 19, 0.92) 100%),
    radial-gradient(ellipse 70% 80% at 50% 0%, rgba(124, 58, 237, 0.18), transparent 60%);
  pointer-events: none;
}

/* ==========================================================================
   2. En-tête (badge catégorie + date + titre) → carte flottante
   ========================================================================== */
/* Le conteneur externe devient transparent : l'image se voit derrière la carte */
body.single-post:not(.postid-1201) .gb-container-36d770b2 {
  margin-top: -130px;
  background-color: transparent;
}

/* La carte intérieure */
body.single-post:not(.postid-1201) .gb-container-57ff1b6b {
  position: relative;
  background: linear-gradient(180deg, rgba(26, 22, 45, 0.92), var(--base-3) 70%);
  border: 1px solid var(--jpia-border-accent);
  border-radius: 18px;
  box-shadow: var(--jpia-glow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  padding: 32px 40px 36px;
}

/* Ligne badge + date */
body.single-post:not(.postid-1201) .gb-container-23230769 {
  margin-bottom: 16px;
}

/* Badge catégorie → pilule violette */
body.single-post:not(.postid-1201) .gb-headline-2a820878 {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8b5cf6, var(--jpia-fuchsia));
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 0;
}
body.single-post:not(.postid-1201) .gb-headline-2a820878 a,
body.single-post:not(.postid-1201) .gb-headline-2a820878 .post-term-item {
  color: #fff;
}

/* Date : petite, atténuée (l'icône calendrier da59ec63 sert de séparateur) */
body.single-post:not(.postid-1201) .gb-headline-0167b8cc {
  display: inline-flex;
  align-items: center;
  color: var(--contrast-3);
}
body.single-post:not(.postid-1201) .gb-headline-da59ec63 .gb-icon svg {
  fill: var(--jpia-violet-soft);
  color: var(--jpia-violet-soft);
}

/* Titre (reste un H2 — taille hero via CSS uniquement) */
body.single-post:not(.postid-1201) .gb-headline-64cb7935 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  padding: 0;
  border: 0;
  background: linear-gradient(115deg, #f4f4fb 38%, var(--jpia-violet-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   3. Encadré auteur + commentaires : alignés sur la colonne de lecture
   ========================================================================== */
body.single-post:not(.postid-1201) .gb-container-2b35d05b,
body.single-post:not(.postid-1201) #comments {
  width: 100%;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

body.single-post:not(.postid-1201) .gb-container-2b35d05b {
  border: 1px solid var(--jpia-border);
  border-radius: 16px;
  overflow: hidden;
}

/* ==========================================================================
   4. Mobile
   ========================================================================== */
@media (max-width: 768px) {
  body.single-post:not(.postid-1201) figure.gb-block-image-a1eaa992 img {
    height: clamp(220px, 46vw, 320px);
  }
  body.single-post:not(.postid-1201) .gb-container-36d770b2 {
    margin-top: -80px;
  }
  body.single-post:not(.postid-1201) .gb-container-57ff1b6b {
    padding: 24px 22px 26px;
    border-radius: 14px;
  }
}

/* ==========================================================================
   5. Scrollytelling : barre de lecture + verdict collant + reveals
   ========================================================================== */
.jpia-readbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9999;
  background: transparent;
  pointer-events: none;
}
.jpia-readbar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #8b5cf6, var(--jpia-fuchsia));
  box-shadow: 0 0 10px rgba(217, 70, 239, 0.6);
}

.jpia-verdict {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100% - 28px);
  padding: 10px 12px 10px 10px;
  border-radius: 14px;
  background: rgba(21, 21, 37, 0.92);
  border: 1px solid var(--jpia-border-accent);
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.6), var(--jpia-glow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translate(-50%, 150%);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
}
.jpia-verdict.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.jpia-verdict-img {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
  border: 0;
}
.jpia-verdict-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.jpia-verdict-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--contrast);
  white-space: nowrap;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jpia-verdict-score {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--jpia-violet-soft);
}
.jpia-verdict-score small { color: var(--contrast-3); font-weight: 600; }
.jpia-verdict-cta {
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: 9px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, #8b5cf6, var(--jpia-fuchsia));
  box-shadow: 0 6px 20px -8px rgba(168, 85, 247, 0.6);
  white-space: nowrap;
  transition: filter 0.2s ease;
}
.jpia-verdict-cta:hover, .jpia-verdict-cta:focus { color: #fff; filter: brightness(1.1); }

@media (max-width: 480px) {
  .jpia-verdict-name { max-width: 120px; }
}

/* Révélations au scroll (ajoutées par JS uniquement → contenu visible sans JS) */
.jpia-sr {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.jpia-sr.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .jpia-sr { opacity: 1 !important; transform: none !important; }
  .jpia-verdict { transition: none; }
}
