/* KelJooJoo — direction « Coffre à jouets » : clair, chaleureux, ludique.
   Thème clair uniquement. Polices hébergées (Baloo 2, Nunito, licence OFL). */

@font-face { font-family: "Baloo 2"; src: url(/fonts/baloo-2.woff2) format("woff2"); font-weight: 600 800; font-display: swap; }
@font-face { font-family: Nunito; src: url(/fonts/nunito.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --fond: #fff8ee; --carte: #ffffff; --ombre: 0 2px 0 #f1e3cf; --filet: #f1e3cf;
  --texte: #2b2235; --doux: #5e5468;
  --tomate: #e85a3c;          /* accent décoratif (logo, aplats) */
  --bouton: #d0432a;          /* tomate pour boutons et âge actif : 4,6:1 avec du blanc */
  --bouton-survol: #b3371f;
  --lien: #b83a20; --lien-survol: #8a2914;
  --soleil: #ffc94a;
  --menthe: #e3f2ef; --menthe-t: #1f6e68;
  --jaune: #fff1d6; --jaune-t: #8a5e00;
  --rose: #fde5df; --rose-t: #b83a20;
  --titre: "Baloo 2", system-ui, sans-serif;
  --corps: Nunito, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 17px/1.65 var(--corps); }
img { max-width: 100%; height: auto; }
a { color: var(--lien); }
a:hover { color: var(--lien-survol); }
:focus-visible { outline: 3px solid var(--texte); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--titre); color: var(--texte); }
.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; }
.cache[hidden], [hidden] { display: none !important; }

/* ---- en-tête ---- */
.tete { background: var(--carte); border-bottom: 1px solid var(--filet); }
.tete-in { max-width: 1120px; margin: 0 auto; padding: 14px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 32px; }
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--texte); }
.marque:hover { color: var(--texte); }
.logo { width: 44px; height: 44px; border-radius: 14px; background: var(--soleil); display: grid; place-items: center; transform: rotate(-6deg); flex: none; }
.logo svg { width: 34px; height: 34px; display: block; }
.nom { font: 800 30px/1 var(--titre); letter-spacing: -.5px; }
.nom span { color: var(--tomate); }
.menu { display: flex; flex-wrap: wrap; gap: 4px; scrollbar-width: none; }
.menu .court { display: none; }
.menu a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; font-weight: 700; font-size: 15px; color: var(--texte); text-decoration: none; }
.menu a:hover { background: var(--jaune); color: var(--texte); }
.menu a[aria-current] { background: var(--jaune); }

/* ---- rangée des âges ---- */
.ages { max-width: 1120px; margin: 0 auto; padding: 22px 24px 0; }
.ages ul { list-style: none; margin: 0; padding: 0 0 6px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.ages ul::-webkit-scrollbar, .menu::-webkit-scrollbar { display: none; }
.ages a { flex: none; white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--carte); border: 1px solid var(--filet); color: var(--texte); font-weight: 800; font-size: 15px; text-decoration: none; }
.ages a:hover { background: var(--jaune); color: var(--texte); }
.ages a[aria-current] { background: var(--bouton); border-color: var(--bouton); color: #fff; }

/* ---- hero d'une page d'âge ---- */
.hero { max-width: 1120px; margin: 0 auto; padding: 40px 24px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 32px 56px; }
.hero-txt { flex: 999 1 520px; min-width: 0; }
.surtitre { display: block; margin: 0 0 10px; font-weight: 800; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--lien); }
h1 { margin: 0; font-weight: 800; font-size: clamp(36px, 5vw, 58px); line-height: 1.05; letter-spacing: -1px; }
.hero .intro { margin: 20px 0 0; font-size: 19px; max-width: 620px; }
.auteur { margin: 22px 0 0; display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--doux); }
.auteur a { font-weight: 700; }
.pastille { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--texte); color: var(--soleil); display: grid; place-items: center; font-weight: 800; }
.hero-img { flex: 1 1 300px; display: flex; justify-content: center; }
.galet { width: min(320px, 100%); aspect-ratio: 16 / 15; border-radius: 48% 52% 44% 56% / 52% 44% 56% 48%; background: var(--soleil); display: grid; place-items: center; }
.galet img { width: 120%; max-width: none; height: auto; }

/* ---- repères : 3 cartes ---- */
.reperes { max-width: 1120px; margin: 0 auto; padding: 16px 24px 8px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.carte { background: var(--carte); border-radius: 24px; padding: 26px; box-shadow: var(--ombre); }
.carte .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 12px; }
.carte .ico svg { width: 22px; height: 22px; }
.carte h2 { margin: 0 0 6px; font-size: 23px; line-height: 1.2; }
.carte p { margin: 0; font-size: 16px; }
.ico-menthe { background: var(--menthe); color: var(--menthe-t); }
.ico-jaune { background: var(--jaune); color: var(--jaune-t); }
.ico-rose { background: var(--rose); color: var(--rose-t); }

/* ---- idées de cadeaux ---- */
.cadeaux { max-width: 1120px; margin: 0 auto; padding: 48px 24px 24px; }
.cadeaux-tete { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.cadeaux h2, .selection h2 { margin: 0; font-weight: 800; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
.filtres { display: flex; flex-wrap: wrap; gap: 8px; }
.filtres button { font: 800 15px var(--corps); cursor: pointer; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 2px solid #e9dcc8; background: var(--carte); color: var(--texte); }
.filtres button:hover { border-color: var(--texte); }
.filtres button[aria-pressed="true"] { background: var(--texte); border-color: var(--texte); color: #fff; }
.mention-aff { margin: 14px 0 0; display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--doux); max-width: 760px; }
.mention-aff svg { flex: none; width: 18px; height: 18px; margin-top: 2px; }
.idees { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.groupe { display: contents; }
.idee { background: var(--carte); border-radius: 26px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--ombre); }
.idee-img { position: relative; height: 190px; display: grid; place-items: center; background: var(--menthe); }
.idee-img.t2 { background: var(--jaune); }
.idee-img.t3 { background: var(--rose); }
.idee-img img { width: 230px; max-height: 175px; object-fit: contain; }
.budget { position: absolute; top: 14px; left: 14px; margin: 0; background: var(--carte); color: var(--texte); font-weight: 800; font-size: 13px; line-height: 1.2; padding: 5px 12px; border-radius: 999px; }
.idee-txt { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.idee h4 { margin: 0; font-weight: 700; font-size: 24px; line-height: 1.15; }
.idee-txt p, .art .idee-txt p { margin: 0; font-size: 16px; flex: 1; }
.achat { align-self: flex-start; margin-top: 6px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--bouton); color: #fff; font-weight: 800; font-size: 15px; text-decoration: none; }
.achat:hover { background: var(--bouton-survol); color: #fff; }
.achat svg { width: 16px; height: 16px; flex: none; }

/* ---- voisins / pour aller plus loin ---- */
.voisins { max-width: 1120px; margin: 0 auto; padding: 24px 24px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.voisin { display: flex; align-items: center; gap: 14px; min-height: 44px; padding: 22px 26px; border-radius: 24px; text-decoration: none; color: var(--texte); background: var(--menthe); }
.voisin:hover { color: var(--texte); filter: brightness(.97); }
.voisin.suivant { background: var(--jaune); justify-content: flex-end; text-align: right; }
.voisin small { display: block; font-size: 14px; font-weight: 700; color: var(--menthe-t); }
.voisin.suivant small { color: var(--jaune-t); }
.voisin b { font: 800 22px/1.2 var(--titre); }
.voisin svg { width: 22px; height: 22px; flex: none; }
.voisin.suivant svg { color: var(--jaune-t); }
.voisin:not(.suivant) svg { color: var(--menthe-t); }
.aider { max-width: 1120px; margin: 0 auto; padding: 16px 24px 56px; }
.aider h2 { margin: 0 0 14px; font-weight: 800; font-size: 28px; line-height: 1.15; }
.aider ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.aider a { display: block; min-height: 44px; height: 100%; padding: 18px 20px; border-radius: 20px; background: var(--carte); box-shadow: var(--ombre); text-decoration: none; color: var(--texte); }
.aider a:hover { color: var(--texte); background: var(--jaune); }
.aider b { display: block; font: 700 19px/1.25 var(--titre); }
.aider small { display: block; margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--doux); }

/* ---- articles « normaux » ---- */
.art { max-width: 720px; margin: 0 auto; padding: 40px 24px 24px; }
.art h1 { font-size: clamp(34px, 5vw, 48px); }
.art .auteur { margin-bottom: 8px; }
.art p { margin: 16px 0 0; }
.art .intro { font-size: 20px; line-height: 1.6; }
.art h2 { margin: 44px 0 0; font-weight: 700; font-size: clamp(25px, 3.4vw, 30px); line-height: 1.2; }
.art h3 { margin: 28px 0 0; font-weight: 700; font-size: 22px; }
.art ul, .art ol { margin: 14px 0 0; padding-left: 22px; }
.art li { margin: 6px 0; }
.logo-img { background: var(--carte); padding: 10px; border-radius: 18px; box-shadow: var(--ombre); height: auto; }
.logo-g { float: left; margin: 6px 22px 10px 0; }
.logo-d { float: right; margin: 6px 0 10px 22px; }
.art::after { content: ""; display: block; clear: both; }
.retenir { margin: 28px 0 0; padding: 20px 24px; border-radius: 20px; background: var(--menthe); color: var(--texte); }
.retenir p:first-child { margin-top: 0; }
.selection { max-width: 1120px; margin: 0 auto; padding: 32px 24px 24px; }
.selection > p { max-width: 720px; margin: 12px 0 0; }
.selection .mention-aff { margin-top: 14px; }
.lecture .selection, .lecture .aider { max-width: 720px; }
.lecture .aider ul { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
/* grilles de produits des articles : elles débordent de la colonne de lecture (720 px) jusqu'à ~1000 px, centrées sur la page */
.lecture .idees:not(.idees-h) { position: relative; left: 50%; transform: translateX(-50%); width: min(1000px, calc(100vw - 48px)); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.art .budget { margin: 0; }
.art .idee-txt p { margin: 0; }
/* 1 ou 2 fiches : carte horizontale, alignée sur la colonne de lecture */
.lecture .idees-h { grid-template-columns: 1fr; margin-top: 20px; }
.idees-h .idee { flex-direction: row; }
.idees-h .idee-img { flex: 0 0 38%; height: auto; min-height: 190px; }
.idees-h .idee-txt { justify-content: center; }
.idees-h .idee-img img { width: 86%; }


/* ---- pied de page ---- */
.pied { background: var(--texte); color: #f4ecff; margin-top: 24px; }
.pied-in { max-width: 1120px; margin: 0 auto; padding: 36px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; font-size: 15px; }
.pied-nom { font: 800 24px/1.1 var(--titre); color: var(--soleil); }
.pied-sous { color: #cfc6dc; margin-top: 4px; }
.pied a { color: #f4ecff; }
.pied a:hover { color: var(--soleil); }
.pied-liens { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.pied-liens a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; }
.pied-bas { flex-basis: 100%; margin: 0; font-size: 13px; line-height: 1.6; color: #cfc6dc; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.pied-bas .amazon { margin: 0; }
.editeur a { display: inline-flex; align-items: center; gap: 6px; }
.palmier { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .tete-in { padding: 12px 16px; }
  .nom { font-size: 27px; }
  .menu a { padding: 0 12px; }
  .ages, .hero, .reperes, .cadeaux, .voisins, .aider, .selection { padding-left: 16px; padding-right: 16px; }
  .hero { padding-top: 28px; gap: 24px; }
  .art { padding-left: 16px; padding-right: 16px; }
  .idees { grid-template-columns: 1fr; }
  .logo-g, .logo-d { float: none; display: block; margin: 16px 0 0; }
  .pied-in { padding: 28px 16px; }
}

/* ---- éléments des pages de contenu ---- */
.art h3[id], .art [id].choix-age { scroll-margin-top: 24px; }
.choix-age { margin: 36px 0 0; padding: 24px 26px 26px; border-radius: 24px; background: var(--carte); box-shadow: var(--ombre); }
.art .choix-age h2 { margin: 0; font-size: 26px; line-height: 1.2; }
.choix-age ul { list-style: none; margin: 16px 0 0; padding: 0 2px 4px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.choix-age ul::-webkit-scrollbar { display: none; }
.choix-age li { margin: 0; flex: none; }
.choix-age a { display: inline-flex; align-items: center; min-height: 52px; padding: 0 20px; border-radius: 999px; background: var(--fond); border: 2px solid var(--filet); color: var(--texte); font: 800 18px/1 var(--corps); text-decoration: none; white-space: nowrap; }
.choix-age a:hover { background: var(--jaune); border-color: var(--soleil); color: var(--texte); }
.art p.changer-age { margin: 14px 0 0; font-size: 14px; text-align: right; }
.changer-age a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; color: var(--doux); font-weight: 700; text-decoration: none; }
.changer-age a:hover { color: var(--lien); text-decoration: underline; }
.changer-age svg { width: 14px; height: 14px; }
.voir-aussi { font-size: 15px; color: var(--doux); }
.art details { margin: 12px 0 0; background: var(--carte); border-radius: 20px; box-shadow: var(--ombre); padding: 0 22px; }
.art summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; padding: 10px 0; font: 700 19px/1.3 var(--titre); }
.art details[open] summary { color: var(--lien); }
.art details p { margin: 0 0 18px; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 20px 0 0; border-radius: 22px; overflow: hidden; background: var(--texte); box-shadow: var(--ombre); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.logo-editeur { margin: 20px 0 0; }
.logo-editeur img { background: var(--carte); padding: 14px 18px; border-radius: 18px; box-shadow: var(--ombre); }
.art em, .art i { font-style: italic; }
.hero h1 em { font-style: normal; color: var(--lien); }

/* ---- listes de cartes (accueil : dossiers ; hub : âges) ---- */
.bloc { max-width: 1120px; margin: 0 auto; padding: 40px 24px 8px; }
.bloc > h2 { margin: 0; font-weight: 800; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; }
.bloc > p { max-width: 720px; margin: 14px 0 0; }
.liste-cartes { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; counter-reset: c; }
.liste-cartes a { display: grid; grid-template-columns: 52px 1fr; column-gap: 14px; align-items: start; height: 100%; min-height: 44px; padding: 20px 22px; border-radius: 24px; background: var(--carte); box-shadow: var(--ombre); text-decoration: none; color: var(--texte); }
.liste-cartes a:hover { color: var(--texte); background: var(--jaune); }
.liste-cartes .n { grid-row: 1 / span 2; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--menthe); color: var(--menthe-t); font: 800 22px/1 var(--titre); }
.liste-cartes li:nth-child(3n+2) .n { background: var(--jaune); color: var(--jaune-t); }
.liste-cartes li:nth-child(3n) .n { background: var(--rose); color: var(--rose-t); }
.liste-cartes b { font: 700 20px/1.25 var(--titre); align-self: center; }
.liste-cartes small { display: block; grid-column: 2; margin-top: 4px; font-size: 15px; line-height: 1.5; color: var(--doux); }
.hero-txt > p { margin: 16px 0 0; max-width: 620px; }
.hero-txt > .intro { font-size: 19px; }
.hero-txt > .auteur { margin-top: 22px; }
.accueil-panda { position: relative; }
.galet.accueil-panda img { width: 74%; max-width: none; height: auto; }
.tampon { position: absolute; right: 2%; bottom: 8%; transform: rotate(-6deg); background: var(--carte); color: var(--texte); font: 800 14px/1.25 var(--titre); text-align: center; padding: 8px 16px; border-radius: 999px; box-shadow: var(--ombre); }
@media (prefers-reduced-motion: no-preference) {
  .galet.accueil-panda img { animation: balance 4s ease-in-out infinite; transform-origin: 50% 90%; }
  .accueil-panda { animation: monte .8s ease-out both; }
}
@keyframes balance { 0%, 100% { transform: translateY(0) rotate(-2.5deg); } 50% { transform: translateY(-10px) rotate(2.5deg); } }
@keyframes monte { from { opacity: 0; transform: translateY(14px); } }
.accueil-panda { overflow: visible; }

@media (max-width: 600px) {
  .tete-in { flex-wrap: nowrap; gap: 8px; }
  .marque { flex: none; }
  .menu { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; }
  .menu a { flex: none; white-space: nowrap; }
  .menu .long { display: none; }
  .menu .court { display: inline; }
  .hero-img { flex-basis: 100%; }
  .galet { width: 180px; }
  .galet.accueil-panda { width: 230px; }
  .tampon { font-size: 12px; padding: 5px 11px; right: -8%; bottom: 0; }
  .bloc { padding-left: 16px; padding-right: 16px; }
  .lecture .idees:not(.idees-h) { left: auto; transform: none; width: 100%; }
  .choix-age { padding: 20px 18px 22px; }
  .idees-h .idee { flex-direction: column; }
  .idees-h .idee-img { flex: none; min-height: 0; height: 150px; }
}
