:root {
  --jp-blue: #48c6ef;
  --jp-purple: #6f86d6;
  --jp-dark: #223046;
  --jp-text: #2b3f5f;
  --jp-soft: #eef3ff;
  --jp-border: #d8e7ff;
  --jp-white: #ffffff;
  --jp-shadow: 0 8px 24px rgba(0,0,0,.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f4f7fb;
  color: var(--jp-text);
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

.jp-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 18px;
}

/* Header */
.jp-site-header {
  background: #fff;
  border-bottom: 1px solid var(--jp-border);
  position: sticky;
  top: 0;
  z-index: 999;
}

.admin-bar .jp-site-header {
  top: 32px;
}

.jp-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.jp-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  color: var(--jp-dark);
}

.jp-logo-icon {
  font-size: 1.6rem;
}

.jp-logo-text {
  font-size: 1.15rem;
}

.jp-main-nav {
  display: flex;
  align-items: center;
}

.jp-menu,
.jp-footer-menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.jp-menu a {
  display: inline-block;
  padding: 9px 13px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--jp-dark);
  font-weight: 700;
}

.jp-menu a:hover,
.jp-menu a:focus {
  background: var(--jp-soft);
  outline: none;
}

.jp-menu-toggle {
  display: none;
  border: 0;
  background: var(--jp-soft);
  color: var(--jp-dark);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 1.2rem;
  cursor: pointer;
}

/* Footer */
.jp-site-footer {
  background: #fff;
  border-top: 1px solid var(--jp-border);
  padding: 24px 0;
  text-align: center;
}

.jp-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 18px;
}

.jp-footer-menu {
  justify-content: center;
  margin-top: 8px;
}

.jp-footer-menu a {
  text-decoration: none;
  color: var(--jp-dark);
  font-weight: 600;
}

/* Generic pages */
.jp-page {
  padding: 32px 0;
}

.jp-card {
  background: #fff;
  border: 1px solid var(--jp-border);
  border-radius: 18px;
  padding: 26px;
  box-shadow: var(--jp-shadow);
}

.jp-content {
  line-height: 1.75;
}

.jp-content h1,
.jp-content h2,
.jp-content h3 {
  color: var(--jp-dark);
}

.jp-content h1 {
  margin-top: 0;
}

.jp-content a {
  color: #245bc4;
  font-weight: 700;
}

.jp-pagination {
  margin-top: 24px;
}

/* Buttons */
.jp-btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  border: 2px solid transparent;
}

.jp-btn-primary {
  background: linear-gradient(135deg, var(--jp-blue), var(--jp-purple));
  color: white;
}

.jp-btn-secondary {
  background: white;
  color: var(--jp-dark);
  border-color: var(--jp-border);
}

/* Home */
.jp-home {
  background: #f4f7fb;
}

.jp-hero {
  background: linear-gradient(135deg, var(--jp-blue), var(--jp-purple));
  padding: 46px 0;
}

.jp-hero-box {
  background: rgba(255,255,255,.96);
  border-radius: 24px;
  padding: 34px;
  text-align: center;
  box-shadow: 0 16px 36px rgba(0,0,0,.16);
}

.jp-badge {
  display: inline-block;
  background: var(--jp-soft);
  color: var(--jp-dark);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 900;
  margin: 0 0 14px;
}

.jp-hero h1 {
  color: var(--jp-dark);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  margin: 0 0 14px;
}

.jp-hero p {
  max-width: 780px;
  margin: 0 auto 20px;
  line-height: 1.7;
}

.jp-hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.jp-section {
  padding: 34px 0;
}

.jp-section h2 {
  color: var(--jp-dark);
  font-size: 2rem;
  margin: 0 0 18px;
  text-align: center;
}

.jp-level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}

.jp-level-card {
  background: #fff;
  border: 1px solid var(--jp-border);
  border-radius: 18px;
  padding: 22px;
  text-decoration: none;
  color: var(--jp-text);
  box-shadow: var(--jp-shadow);
  transition: .2s;
}

.jp-level-card:hover,
.jp-level-card:focus {
  transform: translateY(-3px);
  outline: 2px solid var(--jp-blue);
}

.jp-level-card span {
  font-size: 2rem;
}

.jp-level-card h3 {
  color: var(--jp-dark);
  margin: 10px 0 6px;
}

/* Level pages */
.jp-gradient-page {
  background: linear-gradient(135deg, var(--jp-blue), var(--jp-purple));
  padding: 22px 0 34px;
}

.jp-breadcrumbs {
  font-size: .95rem;
  margin: 10px 0 18px;
  color: #17243a;
}

.jp-breadcrumbs a {
  text-decoration: none;
  font-weight: 700;
}

.jp-hero-panel,
.jp-login-bar,
.jp-nav-pills,
.jp-info-section,
.jp-filter-section,
.jp-faq,
.jp-page-footer {
  background: #fff;
  border-radius: 18px;
  margin-bottom: 20px;
  box-shadow: var(--jp-shadow);
  border: 1px solid rgba(255,255,255,.4);
}

.jp-hero-panel {
  padding: 28px;
  text-align: center;
}

.jp-hero-image {
  margin: 0 auto 16px;
  max-width: 1100px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--jp-border);
  box-shadow: 0 10px 26px rgba(0,0,0,.10);
}

.jp-hero-image img {
  display: block;
  margin: 0 auto;
}

.jp-level-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--jp-blue), var(--jp-purple));
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 900;
  margin-bottom: 12px;
}

.jp-hero-panel h1 {
  color: var(--jp-dark);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 10px;
}

.jp-subtitle {
  color: var(--jp-text);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
}

.jp-login-bar {
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.jp-login-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.jp-login-status {
  font-weight: 900;
  color: var(--jp-purple);
}

.jp-small-btn {
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  border: 0;
  cursor: pointer;
}

.jp-student-btn {
  background: linear-gradient(135deg, #ff6b6b, #feca57);
  color: #fff;
}

.jp-teacher-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
}

.jp-logout-btn {
  display: none;
  background: #ff7675;
  color: #fff;
}

.jp-nav-pills {
  padding: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.jp-pill {
  padding: 10px 16px;
  background: var(--jp-soft);
  color: var(--jp-dark);
  text-decoration: none;
  border-radius: 999px;
  font-weight: 800;
  border: 2px solid transparent;
}

.jp-pill:hover,
.jp-pill:focus,
.jp-pill.active {
  background: var(--jp-blue);
  color: #fff;
  outline: none;
}

.jp-info-section,
.jp-filter-section,
.jp-faq,
.jp-page-footer {
  padding: 22px;
}

.jp-info-section h2,
.jp-filter-section h2,
.jp-faq h2 {
  color: var(--jp-dark);
  margin-top: 0;
}

.jp-info-section h3 {
  color: var(--jp-dark);
  margin-top: 18px;
}

.jp-info-section p,
.jp-info-section li {
  line-height: 1.75;
}

.jp-filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.jp-filter-btn {
  padding: 10px 16px;
  border: 2px solid var(--jp-blue);
  background: #fff;
  color: var(--jp-dark);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

.jp-filter-btn:hover,
.jp-filter-btn:focus,
.jp-filter-btn.active {
  background: var(--jp-blue);
  color: #fff;
  outline: none;
}

.jp-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.jp-game-card {
  display: block;
  background: #fff;
  border: 1px solid var(--jp-border);
  border-radius: 18px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--jp-shadow);
  transition: .2s;
}

.jp-game-card:hover,
.jp-game-card:focus {
  transform: translateY(-3px);
  outline: 2px solid var(--jp-blue);
}

.jp-game-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--jp-blue), var(--jp-purple));
  color: #fff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.jp-game-card h2 {
  color: var(--jp-dark);
  font-size: 1.18rem;
  margin: 0 0 8px;
}

.jp-game-card p {
  margin: 0 0 12px;
  line-height: 1.55;
}

.jp-tag {
  background: var(--jp-soft);
  color: var(--jp-dark);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
}

.jp-no-results {
  display: none;
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  font-weight: 900;
  color: var(--jp-dark);
}

.jp-divider {
  height: 14px;
  margin: 18px 0 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0), #cfe3ff, #c9d7ff, rgba(255,255,255,0));
  box-shadow: 0 2px 10px rgba(0,0,0,.08) inset;
}

.jp-faq details {
  border: 1px solid var(--jp-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 10px 0;
}

.jp-faq summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--jp-dark);
}

.jp-faq details[open] {
  background: #f6f9ff;
}

.jp-page-footer {
  text-align: center;
}

.jp-page-footer a {
  color: var(--jp-dark);
  font-weight: 700;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 782px) {
  .admin-bar .jp-site-header {
    top: 46px;
  }
}

@media (max-width: 768px) {
  .jp-menu-toggle {
    display: inline-block;
  }

  .jp-main-nav {
    display: none;
    width: 100%;
  }

  .jp-main-nav.is-open {
    display: block;
  }

  .jp-header-inner {
    flex-wrap: wrap;
  }

  .jp-menu {
    flex-direction: column;
    width: 100%;
  }

  .jp-menu a {
    display: block;
    background: var(--jp-soft);
  }

  .jp-login-bar {
    justify-content: center;
    text-align: center;
  }

  .jp-hero-panel {
    padding: 20px;
  }

  .jp-games-grid {
    grid-template-columns: 1fr;
  }
}


/* Ajouts thème complet depuis les anciens fichiers HTML */
.jp-category-box h2 {
  text-align: center;
  margin-top: 0;
}

.jp-category-pills,
.jp-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.jp-filter-section h2 {
  color: var(--jp-dark);
  margin-top: 0;
  margin-bottom: 14px;
}

.jp-home-page .jp-hero-panel {
  margin-top: 10px;
}

.jp-home-actions {
  margin-top: 20px;
}

.jp-game-card h2 {
  line-height: 1.25;
}

.jp-game-card p:empty {
  display: none;
}

.jp-level-page .jp-info-section h2,
.jp-level-page .jp-info-section h3 {
  color: var(--jp-dark);
}

.jp-level-page .jp-info-section p,
.jp-level-page .jp-info-section li {
  color: var(--jp-text);
}

.jp-level-page .jp-info-section ul,
.jp-level-page .jp-info-section ol {
  margin-left: 22px;
}

.jp-level-page .jp-info-section li + li {
  margin-top: 5px;
}

.jp-page-footer a:hover,
.jp-page-footer a:focus,
.jp-footer-menu a:hover,
.jp-footer-menu a:focus {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .jp-category-pills,
  .jp-home-actions {
    align-items: stretch;
  }

  .jp-category-pills .jp-pill,
  .jp-home-actions .jp-btn {
    width: 100%;
    text-align: center;
  }
}

/* ===== Menu principal propre avec sous-menus ===== */

.jp-site-header {
  position: sticky;
  top: 0;
  z-index: 99999;
}

.jp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.jp-logo {
  flex: 0 0 auto;
}

.jp-main-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.jp-menu,
.jp-menu ul,
.jp-menu li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.jp-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex-wrap: nowrap;
}

.jp-menu > li {
  position: relative;
}

.jp-menu > li > a {
  display: block;
  padding: 9px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--jp-dark);
  font-weight: 800;
  white-space: nowrap;
  font-size: .95rem;
}

.jp-menu > li > a:hover,
.jp-menu > li > a:focus {
  background: var(--jp-soft);
  outline: none;
}

/* Important : WordPress peut utiliser .sub-menu OU .children */
.jp-menu .sub-menu,
.jp-menu .children {
  display: block;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 999999;
  min-width: 230px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid var(--jp-border);
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(0,0,0,.18);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.jp-menu > li:hover > .sub-menu,
.jp-menu > li:focus-within > .sub-menu,
.jp-menu > li:hover > .children,
.jp-menu > li:focus-within > .children {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.jp-menu .sub-menu li,
.jp-menu .children li {
  width: 100%;
}

.jp-menu .sub-menu a,
.jp-menu .children a {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  white-space: nowrap;
  font-size: .95rem;
  color: var(--jp-dark);
  background: transparent;
  font-weight: 800;
}

.jp-menu .sub-menu a:hover,
.jp-menu .sub-menu a:focus,
.jp-menu .children a:hover,
.jp-menu .children a:focus {
  background: var(--jp-soft);
  color: var(--jp-dark);
  outline: none;
}

/* Évite que les derniers sous-menus sortent de l’écran */
.jp-menu > li:nth-last-child(-n+3) > .sub-menu,
.jp-menu > li:nth-last-child(-n+3) > .children {
  left: auto;
  right: 0;
}

/* Flèche sur les éléments qui ont un sous-menu */
.jp-menu > li.menu-item-has-children > a::after,
.jp-menu > li.page_item_has_children > a::after {
  content: " ▾";
  font-size: .8em;
  opacity: .75;
}

/* Si le menu est trop large, on réduit un peu */
@media (max-width: 1180px) {
  .jp-menu > li > a {
    padding: 8px 8px;
    font-size: .9rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .jp-header-inner {
    flex-wrap: wrap;
  }

  .jp-menu-toggle {
    display: inline-block;
  }

  .jp-main-nav {
    display: none;
    width: 100%;
    justify-content: flex-start;
  }

  .jp-main-nav.is-open {
    display: block;
  }

  .jp-menu {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 6px;
  }

  .jp-menu > li > a {
    background: var(--jp-soft);
    border-radius: 12px;
    padding: 11px 14px;
  }

  .jp-menu .sub-menu,
  .jp-menu .children {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    position: static;
    min-width: 0;
    width: 100%;
    padding: 4px 0 4px 14px;
    margin: 4px 0 8px;
    background: transparent;
    border: 0;
    border-left: 3px solid var(--jp-border);
    border-radius: 0;
    box-shadow: none;
  }

  .jp-menu .sub-menu a,
  .jp-menu .children a {
    background: #fff;
    margin-bottom: 4px;
    font-size: .92rem;
  }
}

/* =========================================================
   CORRECTION MENU DÉROULANT — ne disparaît plus au survol
   ========================================================= */

.jp-site-header,
.jp-header-inner,
.jp-main-nav,
.jp-menu,
.jp-menu > li {
  overflow: visible !important;
}

.jp-site-header {
  z-index: 999999 !important;
}

.jp-main-nav {
  position: relative;
  z-index: 999999;
}

.jp-menu,
.jp-menu ul,
.jp-menu li {
  list-style: none;
}

.jp-menu > li {
  position: relative;
}

/* On cache les sous-menus par défaut */
.jp-menu .sub-menu,
.jp-menu .children {
  position: absolute !important;
  top: 100% !important; /* IMPORTANT : pas de trou entre le parent et le sous-menu */
  left: 0 !important;
  z-index: 999999 !important;

  display: block !important;
  min-width: 230px;
  padding: 8px;
  margin: 0;

  background: #ffffff;
  border: 1px solid var(--jp-border);
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(0,0,0,.18);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0);
  transition: opacity .15s ease, visibility .15s ease;
}

/* Le sous-menu reste visible quand on survole le parent OU le sous-menu */
.jp-menu > li:hover > .sub-menu,
.jp-menu > li:focus-within > .sub-menu,
.jp-menu > li:hover > .children,
.jp-menu > li:focus-within > .children,
.jp-menu .sub-menu:hover,
.jp-menu .children:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Style des liens du sous-menu */
.jp-menu .sub-menu li,
.jp-menu .children li {
  width: 100%;
}

.jp-menu .sub-menu a,
.jp-menu .children a {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  white-space: nowrap;
  font-size: .95rem;
  color: var(--jp-dark);
  background: transparent;
  font-weight: 800;
}

.jp-menu .sub-menu a:hover,
.jp-menu .sub-menu a:focus,
.jp-menu .children a:hover,
.jp-menu .children a:focus {
  background: var(--jp-soft);
  color: var(--jp-dark);
  outline: none;
}

/* Les derniers menus s’ouvrent vers la gauche pour ne pas sortir de l’écran */
.jp-menu > li:nth-last-child(-n+3) > .sub-menu,
.jp-menu > li:nth-last-child(-n+3) > .children {
  left: auto !important;
  right: 0 !important;
}

/* Flèche sur les éléments qui ont un sous-menu */
.jp-menu > li.menu-item-has-children > a::after,
.jp-menu > li.page_item_has_children > a::after {
  content: " ▾";
  font-size: .8em;
  opacity: .75;
}

/* Mobile : les sous-menus restent ouverts */
@media (max-width: 768px) {
  .jp-menu .sub-menu,
  .jp-menu .children {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    min-width: 0;
    width: 100%;
    padding: 4px 0 4px 14px;
    margin: 4px 0 8px;
    background: transparent;
    border: 0;
    border-left: 3px solid var(--jp-border);
    border-radius: 0;
    box-shadow: none;
  }

  .jp-menu .sub-menu a,
  .jp-menu .children a {
    background: #ffffff;
    margin-bottom: 4px;
  }
}


/* =========================================================
   BLOC ACCUEIL SEO — Jeux pédagogiques gratuits
   ========================================================= */

.jp-home-page .jp-home-seo-block {
  background: #ffffff !important;
  border: 1px solid var(--jp-border);
  border-radius: 24px;
  padding: 34px;
  margin: 26px 0;
  box-shadow: 0 14px 34px rgba(0,0,0,.14);
}

.jp-home-page .jp-home-seo-block h2 {
  color: var(--jp-dark);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.2;
  margin: 0 0 18px;
  text-align: left;
}

.jp-home-page .jp-home-seo-block p {
  color: var(--jp-text);
  font-size: 1.05rem;
  line-height: 1.8;
  margin: 0 0 16px;
}

.jp-home-page .jp-home-seo-block strong {
  color: var(--jp-dark);
}

.jp-home-page .jp-home-seo-block a {
  color: #245bc4;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.jp-home-page .jp-home-seo-block a:hover,
.jp-home-page .jp-home-seo-block a:focus {
  color: var(--jp-purple);
}

/* Colonnes du bloc SEO */
.jp-home-page .jp-home-three-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.jp-home-page .jp-home-three-cols article {
  background: linear-gradient(135deg, #f7fbff 0%, #eef3ff 100%);
  border: 1px solid var(--jp-border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
}

.jp-home-page .jp-home-three-cols article h3 {
  color: var(--jp-dark);
  margin: 0 0 10px;
  font-size: 1.18rem;
}

.jp-home-page .jp-home-three-cols article p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
}

/* Bloc Choisir un niveau */
.jp-home-page .jp-info-section {
  background: #ffffff !important;
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 14px 34px rgba(0,0,0,.14);
}

.jp-home-page .jp-info-section > h2 {
  text-align: center;
  color: var(--jp-dark);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin: 0 0 24px;
}

.jp-home-page .jp-level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.jp-home-page .jp-level-card {
  background: #ffffff;
  border: 1px solid var(--jp-border);
  border-radius: 20px;
  padding: 22px;
  height: 100%;
  box-shadow: 0 8px 22px rgba(0,0,0,.08);
}

.jp-home-page .jp-level-card h3 {
  color: var(--jp-dark);
}

.jp-home-page .jp-level-card p {
  color: var(--jp-text);
  line-height: 1.65;
}

@media (max-width: 768px) {
  .jp-home-page .jp-home-seo-block,
  .jp-home-page .jp-info-section {
    padding: 22px;
    border-radius: 20px;
  }

  .jp-home-page .jp-home-seo-block h2 {
    text-align: center;
  }
}
/* =========================================================
   CORRECTION FAQ + BLOG ACCUEIL
   ========================================================= */

.jp-home-page .jp-home-faq,
.jp-home-page .jp-home-blog {
  background: #ffffff !important;
  border: 1px solid var(--jp-border) !important;
  border-radius: 24px !important;
  padding: 30px !important;
  margin: 26px 0 !important;
  box-shadow: 0 14px 34px rgba(0,0,0,.14) !important;
  color: var(--jp-text) !important;
}

.jp-home-page .jp-home-faq h2,
.jp-home-page .jp-home-blog h2 {
  color: var(--jp-dark) !important;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.25;
  margin: 0 0 20px !important;
}

.jp-home-page .jp-home-faq details {
  background: #f8fbff !important;
  border: 1px solid var(--jp-border) !important;
  border-radius: 16px !important;
  padding: 14px 16px !important;
  margin: 12px 0 !important;
  box-shadow: 0 6px 16px rgba(0,0,0,.05);
}

.jp-home-page .jp-home-faq summary {
  cursor: pointer;
  color: var(--jp-dark) !important;
  font-weight: 900 !important;
  font-size: 1.02rem;
  list-style: none;
}

.jp-home-page .jp-home-faq summary::-webkit-details-marker {
  display: none;
}

.jp-home-page .jp-home-faq summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 8px;
  color: var(--jp-purple);
  font-size: .85rem;
  transition: transform .2s ease;
}

.jp-home-page .jp-home-faq details[open] summary::before {
  transform: rotate(90deg);
}

.jp-home-page .jp-home-faq details[open] {
  background: #ffffff !important;
  border-color: var(--jp-blue) !important;
}

.jp-home-page .jp-home-faq p {
  color: var(--jp-text) !important;
  line-height: 1.7;
  margin: 12px 0 0 !important;
}

.jp-home-page .jp-home-blog p {
  color: var(--jp-text) !important;
  font-size: 1.05rem;
  line-height: 1.75;
  margin: 0 0 18px !important;
}

.jp-home-page .jp-home-blog .jp-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--jp-blue), var(--jp-purple)) !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 12px 20px !important;
  text-decoration: none !important;
  font-weight: 900 !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.14);
}

.jp-home-page .jp-home-blog .jp-btn:hover,
.jp-home-page .jp-home-blog .jp-btn:focus {
  transform: translateY(-2px);
  outline: 2px solid var(--jp-dark);
}

@media (max-width: 768px) {
  .jp-home-page .jp-home-faq,
  .jp-home-page .jp-home-blog {
    padding: 22px !important;
    border-radius: 20px !important;
  }

  .jp-home-page .jp-home-faq h2,
  .jp-home-page .jp-home-blog h2 {
    text-align: center;
  }
}