/* Jouez Apprenez – feuille de style du site */
@font-face { font-family: "Fredoka"; font-weight: 500; font-display: swap; src: url(../fonts/fredoka-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 600; font-display: swap; src: url(../fonts/fredoka-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Fredoka"; font-weight: 700; font-display: swap; src: url(../fonts/fredoka-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url(../fonts/nunito-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url(../fonts/nunito-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url(../fonts/nunito-latin-800-normal.woff2) format("woff2"); }

:root {
  --bg: #faf6ec; --paper: #ffffff; --ink: #2c344a; --soft: #6b7287; --line: #ece5d6;
  --purple: #954cc8; --teal: #00a6ba; --orange: #ff9800; --green: #43aa52;
  --red: #ef5350; --blue: #4285f4; --yellow: #fac41e; --gold: #ffc107;
  --radius: 22px; --shadow: 0 6px 0 #e3dccd; --max: 1180px;
  --font-title: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font-body); }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-title); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.section { padding: 56px 0; }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--soft); max-width: 640px; }
.center .lead { margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 14px; z-index: 99; }

/* ---------- en-tête ---------- */
.site-header { background: var(--paper); border-bottom: 3px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font: 700 1.6rem var(--font-title); }
.logo svg { width: 38px; height: 38px; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); font: 600 1.05rem var(--font-title); padding: 8px 14px; border-radius: 14px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--bg); }
.nav .btn { margin-left: 6px; }
.menu-toggle { display: none; background: none; border: 0; font: 600 1.05rem var(--font-title); color: var(--ink);
  padding: 8px 12px; border-radius: 12px; cursor: pointer; }
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--paper);
    flex-direction: column; align-items: stretch; padding: 10px 16px 18px; border-bottom: 3px solid var(--line); }
  .nav.open { display: flex; }
  .nav .btn { margin: 6px 0 0; text-align: center; }
}

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  font: 600 1.1rem var(--font-title); text-decoration: none; color: #fff !important; background: var(--green);
  padding: 13px 24px; border-radius: 18px; box-shadow: 0 5px 0 #2f7d3b; transition: transform .1s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #2f7d3b; }
.btn.blue { background: var(--blue); box-shadow: 0 5px 0 #2f62b8; }
.btn.light { background: var(--paper); color: var(--ink) !important; box-shadow: 0 5px 0 #ddd5c3; }
.btn.small { padding: 9px 16px; font-size: 1rem; border-radius: 14px; }

/* ---------- héros ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero .tag { display: inline-block; background: var(--paper); border-radius: 99px; padding: 6px 16px;
  font: 600 .95rem var(--font-title); color: var(--purple); box-shadow: var(--shadow); margin-bottom: 18px; }
.hero h1 span { color: var(--orange); }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.hero .trust { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 26px; color: var(--soft); font-weight: 700; font-size: .95rem; }
.hero .trust span::before { content: "✓ "; color: var(--green); }
.hero-visual { position: relative; }
.hero-visual img { border-radius: 26px; box-shadow: 0 10px 0 #e3dccd; transform: rotate(1.5deg); }
.bubble { position: absolute; border-radius: 50%; opacity: .25; z-index: -1; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero { padding-top: 36px; } }

/* ---------- cartes de jeux ---------- */
.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; margin-top: 32px; }
.game-card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: transform .15s; }
.game-card:hover { transform: translateY(-5px); }
.game-card img { aspect-ratio: 960 / 680; object-fit: cover; border-bottom: 6px solid var(--c, var(--green)); }
.game-card .body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.game-card h3 { margin: 6px 0 4px; font-size: 1.5rem; }
.game-card p { color: var(--soft); margin: 0 0 16px; flex: 1; }
.badge { display: inline-block; font: 600 .85rem var(--font-title); color: #fff; background: var(--c, var(--green));
  padding: 3px 12px; border-radius: 99px; }
.ages { font-size: .9rem; color: var(--soft); font-weight: 700; }
.game-card .play { font: 600 1.05rem var(--font-title); color: var(--c); }

/* ---------- compétences ---------- */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 30px; }
.skill { background: var(--paper); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.skill .ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 12px;
  background: var(--c); color: #fff; font: 700 1.5rem var(--font-title); }
.skill p { color: var(--soft); margin: 0; }

/* ---------- bandeau parents ---------- */
.band { background: var(--paper); border-radius: 30px; padding: 40px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { padding-left: 34px; position: relative; font-weight: 700; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%;
  background: var(--green); color: #fff; display: grid; place-items: center; font-size: .85rem; }
@media (max-width: 860px) { .band { grid-template-columns: 1fr; padding: 26px; } }

/* ---------- vidéos ---------- */
.video-box { background: var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16 / 9; }
.video-box video, .video-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 28px; }
.video-item h3 { margin: 14px 0 4px; }
.video-item p { color: var(--soft); margin: 0; }
.video-hero { max-width: 900px; margin: 28px auto 0; }

/* ---------- page de jeu ---------- */
.crumbs { font-size: .95rem; color: var(--soft); margin: 22px 0 6px; }
.crumbs a { color: var(--soft); }
.game-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.game-head h1 { margin: 0; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.game-frame { background: var(--paper); border-radius: 26px; padding: 14px; box-shadow: var(--shadow); }
.game-frame canvas { width: 100%; aspect-ratio: 960 / 680; display: block; border-radius: 16px; touch-action: manipulation;
  background: var(--bg); cursor: pointer; }
.game-tools { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.game-frame:fullscreen { display: grid; place-items: center; background: var(--bg); padding: 2vh; border-radius: 0; }
.game-frame:fullscreen canvas { width: min(96vw, 96vh * 960 / 680); }
.game-frame:fullscreen .game-tools { position: fixed; top: 12px; right: 12px; }
.content-block { background: var(--paper); border-radius: var(--radius); padding: 28px 30px; box-shadow: var(--shadow); margin-top: 28px; }
.content-block ul { padding-left: 20px; margin: 0; }
.content-block li { margin-bottom: 6px; }
.levels { width: 100%; border-collapse: collapse; margin-top: 8px; }
.levels th, .levels td { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--line); vertical-align: top; }
.levels th { font: 600 1rem var(--font-title); }
.lvl { font: 600 .9rem var(--font-title); color: #fff; padding: 2px 10px; border-radius: 99px; white-space: nowrap; }
.lvl.f { background: var(--green); } .lvl.m { background: var(--orange); } .lvl.d { background: var(--red); }
.sidebar { position: sticky; top: 96px; display: grid; gap: 24px; }
.mini-games { display: grid; gap: 12px; }
.mini-game { display: flex; gap: 12px; align-items: center; background: var(--paper); border-radius: 18px; padding: 10px;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.mini-game img { width: 84px; border-radius: 12px; }
.mini-game strong { font: 600 1.1rem var(--font-title); display: block; }
.mini-game span { font-size: .88rem; color: var(--soft); }
@media (max-width: 980px) { .game-layout { grid-template-columns: 1fr; } .sidebar { position: static; } }

/* ---------- emplacements publicitaires ---------- */
.pub { margin: 36px auto; text-align: center; }
.pub::before { content: "Publicité"; display: block; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  color: #a7a08f; margin-bottom: 6px; }
.pub-zone { margin-inline: auto; display: grid; place-items: center; }
.pub-banniere .pub-zone { width: 100%; max-width: 728px; min-height: 90px; }
.pub-carre .pub-zone { width: 300px; min-height: 250px; }
.pub-haute .pub-zone { width: 300px; min-height: 600px; }
.pub-vide .pub-zone { border: 2px dashed #d8cfbb; border-radius: 14px; color: #a7a08f; font: 600 .95rem var(--font-title); }
.sidebar .pub { margin: 0; }
@media (max-width: 760px) { .pub-banniere .pub-zone { min-height: 100px; max-width: 336px; } }

/* ---------- textes longs ---------- */
.prose { max-width: 780px; margin-inline: auto; }
.prose h2 { margin-top: 1.6em; }
.prose .content-block h2:first-child { margin-top: 0; }
.note { background: #fff7e0; border-radius: 16px; padding: 16px 20px; border-left: 6px solid var(--gold); }

/* ---------- pied de page ---------- */
.site-footer { background: var(--ink); color: #d9dce6; margin-top: 64px; padding: 44px 0 30px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h4 { font: 600 1.1rem var(--font-title); color: #fff; margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer .logo { color: #fff; margin-bottom: 10px; }

.site-footer .wrap.copy { display: block; }
.copy { border-top: 1px solid #434b63; margin-top: 30px; padding-top: 18px; font-size: .9rem; color: #9aa0b4; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ---------- conseils / articles ---------- */
.articles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 30px; }
.article-card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  text-decoration: none; color: var(--ink); display: flex; flex-direction: column; transition: transform .15s; }
.article-card:hover { transform: translateY(-5px); }
.article-card .body { padding: 18px 22px 22px; }
.article-card h3 { margin: 10px 0 6px; font-size: 1.3rem; }
.article-card p { color: var(--soft); margin: 0; }
svg.cover { width: 100%; height: auto; aspect-ratio: 400 / 220; display: block; }
.article .badge { margin-top: 6px; }
.article h1 { font-size: clamp(2rem, 4.2vw, 3rem); margin: 14px 0 10px; }
.article-meta { color: var(--soft); font-weight: 700; font-size: .95rem; }
.article svg.cover { border-radius: 24px; margin: 22px 0 26px; box-shadow: var(--shadow); }
.article-intro { font-size: 1.22rem; color: var(--ink); max-width: none; }
.article h2 { margin-top: 1.7em; }
.article li { margin-bottom: 8px; }
.cta-box { background: var(--paper); border-radius: 24px; box-shadow: var(--shadow); padding: 26px 28px; margin: 40px 0;
  display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-left: 10px solid var(--orange); }
.cta-box h3 { margin: 0 0 4px; } .cta-box p { margin: 0; color: var(--soft); }
.cta-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.sources { font-size: .95rem; color: var(--soft); border-top: 2px solid var(--line); padding-top: 8px; }
.sources h2 { font-size: 1.3rem; }
