/* ══════════════════════════════════════════════════════════════════════
   Rubrique Jeux — feuille partagée par jeux.php et ses 4 pages enfants
   (jeux_echecs, jeux_poker, jeux_maths, jeux_logique).

   Les blocs .nav-liste et .section-card étaient recopiés en <style> inline
   dans chaque page de hub ; ils sont ici une bonne fois pour toutes.
   Créée le 17/08/2026 avec la refonte « hub + enfants + chapô ».
══════════════════════════════════════════════════════════════════════ */

/* ── Pas de publicité dans les encarts ───────────────────────────────
   Les encarts portent deux classes : `no-ads` (comme les cartes du coin des
   profs) et `google-anno-skip`. Elles visent deux injections différentes —
   les <ins class="adsbygoogle"> d'Auto ads, et les « recherches associées »
   glissées au fil du texte. Les règles de masquage correspondantes sont
   site-wide, dans style_legacy.html / meta_css.html / css2026/base.css : le
   blockquote des citations en avait besoin sur toutes les pages.

   Concerné ici : .jeux-chapo, .jeux-hub, .jeux-hub-carte, .section-card,
   .jeux-aussi, la nav des rubriques sœurs et le bloc .jbl. */

/* ── Listes de liens ─────────────────────────────────────────────── */
.nav-liste {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 1.5rem;
}
.nav-liste li { margin-bottom: 0.5rem; }
.nav-liste a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  color: #2b2b2b;
  background-color: rgba(255,255,255,0.55);
  border: 1.5px solid rgba(0,0,0,0.07);
  transition: background-color 0.18s ease, transform 0.18s ease,
              box-shadow 0.18s ease, color 0.18s ease;
}
.nav-liste a:hover {
  background-color: rgba(255,255,255,0.92);
  transform: translateX(5px);
  box-shadow: 2px 4px 10px rgba(0,0,0,0.10);
  color: #c0392b;
}
.nav-liste .ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem; height: 2rem;
  border-radius: 7px;
  font-size: 1.1rem;
  background-color: rgba(0,0,0,0.06);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.nav-liste a:hover .ico { transform: scale(1.2); }

/* Le libellé occupe la place restante : le badge est poussé à droite. */
.nav-liste .jeu-nom { flex: 1 1 auto; }

/* ── Badges de type ──────────────────────────────────────────────── */
.jeu-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.jeu-badge-jouable  { background:#e8f6ec; color:#1e7a3c; border-color:#b9e2c6; }
.jeu-badge-appli    { background:#eef4fb; color:#0059a3; border-color:#c3dbf2; }
.jeu-badge-document { background:#f4f0e6; color:#7a5a12; border-color:#e3d7b6; }
.jeu-badge-blog     { background:#f7edf6; color:#7d3572; border-color:#e6cee3; }
.jeu-badge-externe  { background:#f0f0f0; color:#555;    border-color:#d8d8d8; }
.jeu-badge-boutique { background:#fdeeea; color:#a5311f; border-color:#f2cfc6; }

/* ── Sous-liens (une page fille sous son jeu : grilles de Boggle…) ── */
.nav-liste .jeu-sous { margin-left: 2.3rem; margin-bottom: 0.35rem; }
.nav-liste .jeu-sous a {
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  background-color: rgba(255,255,255,0.35);
  border-style: dashed;
}
.nav-liste .jeu-sous .ico { width: 1.6rem; height: 1.6rem; font-size: 0.95rem; }

/* Séparateur avant les liens commerciaux, en fin de liste. */
.nav-liste li.jeu-separateur {
  height: 0;
  margin: 1rem 0.4rem 0.9rem;
  border-top: 1px dashed rgba(0,0,0,0.18);
}

/* ── Cartes de rubrique (listes des pages enfants) ───────────────── */
.section-card {
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 2.2rem;
  background: rgba(255,255,255,0.35);
}
.section-card h2 {
  margin: 0;
  padding: 0.7rem 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a3a6a;
  background: rgba(255,255,255,0.65);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.section-card .nav-liste { margin: 0.5rem 0.7rem 0.7rem; }

/* ── Chapô : le texte d'introduction d'une page enfant ───────────── */
.jeux-chapo {
  max-width: 820px;
  margin: 1.4rem auto 2rem;
  padding: 1.4rem 1.2rem;
  background: #fffefc;
  border-left: 4px solid #c0392b;
  border-radius: 6px;
  font-size: 1rem;
  line-height: 1.7;
  color: #2f2f2f;
  text-align: left;
}
.jeux-chapo p { margin: 0 0 0.8rem; }
.jeux-chapo p:last-child { margin-bottom: 0; }
.jeux-chapo a { color: #a5311f; }
@media screen and (min-width: 768px) {
  .jeux-chapo { padding: 1.8rem 2rem; font-size: 1.03rem; }
}

/* ── Hub : les quatre grandes cartes de rubrique ─────────────────── */
/* Deux colonnes fixes, pas d'auto-fit : les rubriques sont exactement
   quatre, et un auto-fit en pose trois puis une, seule sur sa ligne. */
.jeux-hub {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin: 1.8rem 0 2.4rem;
}
@media (min-width: 700px) {
  .jeux-hub { grid-template-columns: repeat(2, 1fr); }
}
.jeux-hub-carte {
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.2rem 1rem;
  border-radius: 14px;
  border: 1.5px solid rgba(0,0,0,0.09);
  background: rgba(255,255,255,0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease,
              background-color 0.2s ease;
}
.jeux-hub-carte:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.85);
}
.jeux-hub-carte h2 {
  margin: 0 0 0.15rem;
  font-size: 1.2rem;
  color: #1a3a6a;
  border: none;
  padding: 0;
}
.jeux-hub-carte h2 a { color: #1a3a6a; text-decoration: none; }
.jeux-hub-carte h2 a:hover { color: #c0392b; text-decoration: underline; }
.jeux-hub-compte {
  font-size: 0.8rem;
  color: #6b6b6b;
  font-weight: 600;
  margin: 0 0 0.6rem;
}
.jeux-hub-carte .jeux-hub-texte {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #3a3a3a;
  margin: 0 0 0.8rem;
  letter-spacing: normal;
  word-spacing: normal;
}
.jeux-hub-vedettes {
  list-style: none;
  padding: 0;
  margin: 0 0 0.9rem;
  font-size: 0.92rem;
}
.jeux-hub-vedettes li { margin: 0.22rem 0; }
.jeux-hub-vedettes li::before { content: "▸ "; color: #c0392b; }
.jeux-hub-vedettes a { color: #2b2b2b; text-decoration: none; }
.jeux-hub-vedettes a:hover { color: #c0392b; text-decoration: underline; }
.jeux-hub-tout {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 700;
  font-size: 0.93rem;
  color: #c0392b;
  text-decoration: none;
}
.jeux-hub-tout:hover { text-decoration: underline; }

/* ── Derniers articles du blog (blog_derniers_inc.php) ───────────────
   Gabarit repris du « coin des profs » : les cartes s'étalent sur une
   rangée dont le nombre de colonnes suit la largeur d'écran, et le pager
   ‹ › fait défiler les rangées. auto-fill (et non auto-fit) pour que les
   colonnes restent calculables même quand la grille est repliée : c'est
   ce que le script lit pour savoir combien de cartes tiennent. ───────── */
.jbl { margin: 2rem 0 2.4rem; }
.jbl-titre {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: #1a3a6a;
  border: none;
  padding: 0;
}
.jbl-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.1rem;
}
/* Anti-saut : les cartes partent masquées, le pager révèle la rangée courante. */
.jbl-grille[data-jbl-pager] > .jbl-carte { display: none; }
.jbl-grille[data-jbl-pager] > .jbl-carte.jbl-on { display: flex; }
.jbl-carte {
  border: 1px solid #e2eaf4;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.jbl-carte:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.10); transform: translateY(-2px); }
.jbl-vignette { display: block; line-height: 0; }
.jbl-vignette img { width: 100%; height: 150px; object-fit: cover; display: block; }
/* Article sans image vedette : la rangée étire toutes les cartes à la même
   hauteur, et sans ce pavé la carte s'ouvrait sur un grand blanc. */
.jbl-vignette.jbl-vide {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef4fb 0%, #e2eaf4 100%);
  text-decoration: none;
}
.jbl-vignette.jbl-vide span { font-size: 3rem; opacity: 0.55; line-height: 1; }
.jbl-corps {
  padding: 0.7rem 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}
.jbl-corps h3 { margin: 0; font-size: 1.02rem; line-height: 1.3; border: none; padding: 0; }
.jbl-corps h3 a { color: #14305e; text-decoration: none; }
.jbl-corps h3 a:hover { text-decoration: underline; }
.jbl-extrait {
  margin: 0;
  font-size: 0.9rem;
  color: #3a4657;
  line-height: 1.45;
  flex: 1;
  letter-spacing: normal;
  word-spacing: normal;
}
.jbl-meta {
  margin: 0;
  font-size: 0.8rem;
  color: #8592a6;
  letter-spacing: normal;
  word-spacing: normal;
}
.jbl-meta a { color: #0f3f7f; font-weight: 600; text-decoration: none; }
.jbl-meta a:hover { text-decoration: underline; }
.jbl-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.1rem;
}
.jbl-nav button {
  border: 1px solid #cbd8e8;
  background: #fff;
  color: #0f3f7f;
  border-radius: 6px;
  width: 2.2rem; height: 2.2rem;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s;
}
.jbl-nav button:hover:not(:disabled) { background: #eef4fb; }
.jbl-nav button:disabled { opacity: 0.35; cursor: default; }
.jbl-nav .jbl-pageind { font-size: 0.9rem; color: #5a6675; min-width: 3.5rem; text-align: center; }
.jbl-tout {
  margin: 1.1rem 0 0;
  text-align: center;
  font-size: 0.95rem;
  letter-spacing: normal;
  word-spacing: normal;
}
.jbl-tout a { color: #a5311f; }
.jbl-tout .jbl-refresh {
  color: #b0bccd;
  font-weight: 400;
  margin-left: 0.5rem;
  text-decoration: none;
}
.jbl-tout .jbl-refresh:hover { color: #0f3f7f; }

/* ── Encadré « Pour aller plus loin » / « Voir aussi » ───────────── */
.jeux-aussi {
  max-width: 820px;
  margin: 2rem auto;
  padding: 1.1rem 1.3rem;
  background: #f8fbff;
  border: 1px solid #cce5ff;
  border-radius: 12px;
}
.jeux-aussi h2, .jeux-aussi h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: #005ea2;
  border: none;
  padding: 0;
}
.jeux-aussi ul { list-style: none; padding-left: 0.2rem; margin: 0.4rem 0 0; }
.jeux-aussi li { margin: 0.35rem 0; font-size: 0.97rem; }
.jeux-aussi li::before { content: "→ "; color: #005ea2; font-weight: 700; }
.jeux-aussi a { color: #0059a3; }
.jeux-aussi .jeux-regle {
  margin: 0.7rem 0 0;
  font-size: 0.88rem;
  color: #555;
  font-style: italic;
  letter-spacing: normal;
  word-spacing: normal;
}

/* ── Navigation entre les rubriques sœurs, en pied de page enfant ── */
.jeux-soeurs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 2.2rem 0 1rem;
  padding: 0;
  list-style: none;
}
.jeux-soeurs li::before { content: none; }
.jeux-soeurs a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.55);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  color: #2b2b2b;
}
.jeux-soeurs a:hover { background: rgba(255,255,255,0.92); color: #c0392b; }
.jeux-soeurs .jeux-soeur-active a {
  background: #1a3a6a;
  color: #fff;
  border-color: #1a3a6a;
  cursor: default;
}

@media (max-width: 480px) {
  .nav-liste a { font-size: 0.95rem; padding: 0.55rem 0.75rem; }
  .nav-liste .ico { width: 1.8rem; height: 1.8rem; font-size: 1rem; }
  .jeu-badge { font-size: 0.66rem; padding: 0.12rem 0.4rem; }
}
