/* Pipalou — site vitrine. Couleurs de l'app (scripts/pal.gd), aucune ressource externe. */
@font-face { font-family: "Fredoka"; src: url("fonts/fredoka.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --sky: #E8F1EE; --sea: #CFE6E4; --sand: #F4E9D6; --grass: #BFDCC4; --leaf: #97C4A0;
  --coral: #F2B8A2; --coral-dark: #E59A82; --butter: #F6E3A6; --mint: #7FB8A8; --mint-dark: #4F8C7C;
  --lavender: #CFCBF0; --pink: #E9A8C0; --blue: #A9CBE8; --ink: #3E4A52; --ink-soft: #5E6B73;
  --cream: #F6F1E7; --white: #FFFFFF; --night: #2F3558;
  --radius: 22px; --wrap: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif; font-size: 18px; line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mint-dark); }
h1, h2, h3 { font-family: "Fredoka", "Nunito", sans-serif; font-weight: 600; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* En-tête */
.top { padding: 18px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink);
  font-family: "Fredoka", sans-serif; font-size: 1.6rem; font-weight: 600; }
.brand img { width: 44px; height: 44px; border-radius: 12px; }
.lang { font-weight: 700; text-decoration: none; padding: 6px 14px; border-radius: 999px; background: var(--white); }

/* Héros */
.hero { background: var(--sky); padding: 30px 0 60px; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px; align-items: center; }
.hero p.lead { font-size: 1.25rem; color: var(--ink-soft); }
.shot { border-radius: var(--radius); overflow: hidden; box-shadow: 0 18px 40px rgba(62, 74, 82, .16); background: var(--white); }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 22px; padding: 0; list-style: none; }
.badges li { background: var(--white); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .95rem; }
.cta { display: inline-block; background: var(--mint); color: var(--white); text-decoration: none; font-weight: 800;
  padding: 14px 26px; border-radius: 18px; font-size: 1.1rem; }
.cta.soon { background: var(--ink); }
.small { font-size: .95rem; color: var(--ink-soft); }

/* Sections */
section { padding: 64px 0; }
.alt { background: var(--white); }
.center { text-align: center; }
.intro { max-width: 720px; margin: 0 auto 36px; color: var(--ink-soft); text-align: center; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
.step { background: var(--cream); border-radius: var(--radius); padding: 18px; }
.alt .step { background: var(--sky); }
.step figcaption { margin-top: 10px; font-weight: 700; }

/* Zones de jeux */
.zones { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.zone { background: var(--white); border-radius: var(--radius); padding: 22px; border-top: 8px solid var(--mint); }
.zone h3 { display: flex; align-items: center; gap: 10px; }
.zone ul { margin: 0; padding-left: 1.1em; }
.zone li { margin-bottom: 4px; }
.zone li b { font-weight: 800; }
.z-shapes { border-color: var(--coral); } .z-colors { border-color: #F4CF5D; } .z-sizes { border-color: var(--blue); }
.z-logic { border-color: var(--leaf); } .z-numbers { border-color: #8E93BC; } .z-sounds { border-color: var(--pink); }
.z-calm { border-color: var(--lavender); }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 30px; }
.gallery .shot { box-shadow: 0 8px 20px rgba(62, 74, 82, .12); }

/* Parents */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--cream); border-radius: var(--radius); padding: 22px; }
.alt .card { background: var(--sky); }
.card h3 { margin-bottom: .35em; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--mint); }
.dot.c { background: var(--coral); } .dot.y { background: #F4CF5D; } .dot.b { background: var(--blue); }
.dot.p { background: var(--pink); } .dot.l { background: var(--lavender); }

/* Pro */
.pro { background: var(--night); color: #F1F0F8; }
.pro h2, .pro h3 { color: var(--white); }
.pro .intro { color: #D4D6EA; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 880px; margin: 0 auto; }
.plan { border-radius: var(--radius); padding: 26px; background: rgba(255, 255, 255, .07); }
.plan.best { background: var(--white); color: var(--ink); }
.plan.best h3 { color: var(--ink); }
.plan ul { padding-left: 1.1em; margin: 0; }
.plan li { margin-bottom: 6px; }
.tag { display: inline-block; font-size: .85rem; font-weight: 800; padding: 4px 12px; border-radius: 999px;
  background: var(--butter); color: #6B5310; margin-bottom: 10px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: var(--white); border-radius: 18px; padding: 16px 20px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 800; }
.faq details p { margin: 10px 0 0; }

/* Pages de texte (confidentialité) */
.doc { max-width: 820px; margin: 0 auto; padding: 30px 20px 60px; }
.doc h2 { font-size: 1.5rem; margin-top: 1.6em; }
.doc .box { background: var(--white); border-radius: var(--radius); padding: 18px 22px; margin: 20px 0; }
.doc table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 14px; overflow: hidden; }
.doc th, .doc td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--cream); }

/* Pied de page */
footer { background: var(--sand); padding: 34px 0; font-size: .95rem; color: var(--ink-soft); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer p { margin: 0; }

@media (max-width: 860px) {
  .hero .wrap, .two, .plans { grid-template-columns: 1fr; }
  .steps, .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  section { padding: 46px 0; }
}
.lost { margin: 40px auto 20px; border-radius: 28px; }

/* --- Île vivante (dessin vectoriel du haut de page) et petites animations, comme dans le jeu --- */
.isle { width: 100%; height: auto; display: block; border-radius: var(--radius); box-shadow: 0 18px 40px rgba(62, 74, 82, .16); }
.isle g, .isle ellipse, .isle path { transform-box: fill-box; transform-origin: center; }
.isle .sun { animation: breathe 5s ease-in-out infinite; }
.isle .c1 { animation: drift 26s linear infinite; }
.isle .c2 { animation: drift 34s linear infinite reverse; }
.isle .b1 { animation: fly 9s ease-in-out infinite; }
.isle .b2 { animation: fly 11s ease-in-out infinite reverse; }
.isle .wave { animation: lap 4s ease-in-out infinite; }
.isle .w2 { animation-delay: -2s; }
.isle .boat { animation: rock 4.5s ease-in-out infinite; }
.isle .bt2 { animation-delay: -1.8s; }
.isle .duck { animation: bob 3s ease-in-out infinite; }
.isle .tree, .isle .palm { transform-origin: 50% 100%; animation: sway 6s ease-in-out infinite; }
.isle .t2 { animation-delay: -3s; }
.isle .flower { transform-origin: 50% 100%; animation: sway 4s ease-in-out infinite; }
.isle .f2 { animation-delay: -1.3s; } .isle .f3 { animation-delay: -2.6s; }
.isle .pip-body { transform-origin: 50% 100%; animation: hop 3.2s ease-in-out infinite; }
.isle .eyes { animation: blink 4.5s infinite; }
.isle .rabbit { animation: rabbit 5s ease-in-out infinite; }
.isle .turtle { animation: crawl 14s ease-in-out infinite alternate; }
.isle .bee { animation: bee 7s ease-in-out infinite; }
.isle .wing { animation: buzz .18s linear infinite alternate; }
.isle .petal { animation: fall 9s linear infinite; }
.isle .p2 { animation-delay: -2s; animation-duration: 11s; } .isle .p3 { animation-delay: -4.5s; }
.isle .p4 { animation-delay: -6s; animation-duration: 12s; } .isle .p5 { animation-delay: -7.5s; animation-duration: 10s; }
.isle .bub { animation: breathe 3s ease-in-out infinite; }
.isle .u2 { animation-delay: -.6s; } .isle .u3 { animation-delay: -1.2s; } .isle .u4 { animation-delay: -1.8s; } .isle .u5 { animation-delay: -2.4s; }

@keyframes breathe { 50% { transform: scale(1.06); } }
@keyframes drift { from { transform: translateX(-60px); } 50% { transform: translateX(60px); } to { transform: translateX(-60px); } }
@keyframes fly { 50% { transform: translate(40px, -10px); } }
@keyframes lap { 50% { transform: translateX(12px); opacity: .35; } }
@keyframes rock { 25% { transform: rotate(-4deg) translateY(2px); } 75% { transform: rotate(4deg) translateY(-2px); } }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-3deg); } }
@keyframes sway { 25% { transform: rotate(-2.5deg); } 75% { transform: rotate(2.5deg); } }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0) scale(1, 1); } 70% { transform: translateY(2px) scale(1.06, .94); }
  80% { transform: translateY(-16px) scale(.96, 1.05); } 90% { transform: translateY(0) scale(1.04, .96); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes rabbit { 0%, 70%, 100% { transform: translate(0, 0); } 78% { transform: translate(8px, -12px); } 86% { transform: translate(16px, 0); } 93% { transform: translate(8px, -6px); } }
@keyframes crawl { to { transform: translateX(-30px); } }
@keyframes bee { 0% { transform: translate(0, 0); } 25% { transform: translate(40px, -18px); } 50% { transform: translate(80px, 6px); }
  75% { transform: translate(30px, 20px); } 100% { transform: translate(0, 0); } }
@keyframes buzz { to { transform: scaleY(.4); } }
@keyframes fall { from { transform: translate(0, -10px) rotate(0); opacity: 0; } 10% { opacity: 1; }
  to { transform: translate(60px, 300px) rotate(360deg); opacity: 0; } }

/* Petites animations douces du reste de la page */
.dot { animation: breathe 3s ease-in-out infinite; }
.zone:nth-child(2) .dot { animation-delay: -.5s; } .zone:nth-child(3) .dot { animation-delay: -1s; }
.zone:nth-child(4) .dot { animation-delay: -1.5s; } .zone:nth-child(5) .dot { animation-delay: -2s; }
.zone:nth-child(6) .dot { animation-delay: -2.5s; }
.zone, .card, .step, .plan { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s; }
.zone:hover, .card:hover, .step:hover, .plan:hover { transform: translateY(-5px); box-shadow: 0 12px 26px rgba(62, 74, 82, .10); }
.badges li { animation: pop .6s cubic-bezier(.34, 1.56, .64, 1) both; }
.badges li:nth-child(2) { animation-delay: .12s; } .badges li:nth-child(3) { animation-delay: .24s; } .badges li:nth-child(4) { animation-delay: .36s; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.brand img { animation: hop 4s ease-in-out infinite; transform-origin: 50% 100%; }
/* Étoiles qui scintillent dans la partie Pro (fond de nuit) */
.pro { position: relative; overflow: hidden; }
.pro .wrap { position: relative; }
.stars { position: absolute; inset: 0; pointer-events: none; }
.stars i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #FFF1C2; animation: twinkle 3s ease-in-out infinite; }
.stars i:nth-child(1) { left: 6%; top: 18%; } .stars i:nth-child(2) { left: 18%; top: 70%; animation-delay: -.7s; }
.stars i:nth-child(3) { left: 32%; top: 12%; animation-delay: -1.4s; } .stars i:nth-child(4) { left: 52%; top: 86%; animation-delay: -2.1s; }
.stars i:nth-child(5) { left: 68%; top: 22%; animation-delay: -.4s; } .stars i:nth-child(6) { left: 82%; top: 64%; animation-delay: -1.1s; }
.stars i:nth-child(7) { left: 92%; top: 14%; animation-delay: -1.8s; } .stars i:nth-child(8) { left: 44%; top: 40%; animation-delay: -2.5s; }
@keyframes twinkle { 50% { opacity: .2; transform: scale(.6); } }
/* Vidéos du jeu */
video.clip { width: 100%; height: auto; display: block; background: var(--sky); }
.film { max-width: 960px; margin: 0 auto 26px; }
.gallery.clips { grid-template-columns: repeat(3, 1fr); }
.gallery figcaption { font-weight: 700; font-size: .95rem; margin-top: 8px; text-align: center; }
@media (max-width: 860px) { .gallery.clips { grid-template-columns: 1fr 1fr; } }

/* Le visiteur a demandé moins d'animations : tout s'arrête. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
