/* Pages publiques faites par le serveur : accueil (api/accueil) et vidéos (api/videos). Menu : menu.css. */
:root {
  --nuit: #17445c; --creme: #fff9ec; --jaune: #f9e27d; --jaune-fort: #f5c542; --turquoise: #4cc3bf;
  --menthe: #bfeedd; --lavande: #e2d8f7; --peche: #fbd5c6; --ciel: #cfe8fb; --texte: #24323b; --discret: #5b7385;
}
* { box-sizing: border-box; }
html { background: var(--creme); scroll-behavior: smooth; scroll-padding-top: 5rem; }
body { margin: 0; color: var(--texte); font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3, .bouton { font-family: "Baloo 2", system-ui, sans-serif; color: var(--nuit); line-height: 1.15; }
a { color: var(--nuit); text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--turquoise); outline-offset: 3px; }
.conteneur { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }

.bouton { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 700; font-size: 1.15rem; padding: .8rem 1.5rem; border-radius: 999px; border: 2px solid var(--nuit); }
.bouton svg { width: 1.35rem; height: 1.35rem; }
.bouton.plein { background: var(--nuit); color: #fff; }
.bouton.jaune { background: var(--jaune-fort); border-color: var(--jaune-fort); color: var(--nuit); }
.bouton.clair { background: #fff; }

/* Accueil */
.hero { margin-top: 1.5rem; border-radius: 2rem; background: linear-gradient(135deg, var(--ciel), var(--menthe) 55%, var(--jaune)); padding: 2.5rem 2.75rem; display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 1.5rem; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); margin: 0 0 .75rem; }
.hero p { font-size: 1.15rem; margin: 0 0 1.5rem; max-width: 32rem; }
.hero .choix { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero img { width: 100%; max-width: 20rem; height: auto; justify-self: center; filter: drop-shadow(0 12px 18px rgba(23, 68, 92, .15)); }
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; padding: 1.75rem 1.4rem; text-align: center; } .hero img { max-width: 10rem; grid-row: 1; } .hero .choix { justify-content: center; } }

section.bloc { margin-top: 3.25rem; }
section.bloc > h2 { font-size: 1.9rem; margin: 0 0 .35rem; }
p.intro { margin: 0 0 1.25rem; color: var(--discret); }

.annees { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.annee { display: block; text-decoration: none; color: inherit; background: #fff; border: 2px solid #f0e4c8; border-radius: 1.5rem; padding: 1.4rem; transition: transform .15s, border-color .15s; }
a.annee:hover { transform: translateY(-3px); border-color: var(--jaune-fort); }
.annee .nom { font: 800 2.4rem/1 "Baloo 2", sans-serif; color: var(--nuit); }
.annee .age { color: var(--discret); font-size: .95rem; }
.annee ul, .puces { list-style: none; padding: 0; margin: .9rem 0 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.annee li, .puces li { font-size: .85rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; }
.annee .total { margin-top: .9rem; font-weight: 700; color: var(--nuit); }
.annee.bientot { background: #fbf6ea; border-style: dashed; }
.annee.bientot .total { color: var(--discret); font-weight: 600; }
.m-Francais { background: var(--peche); } .m-Math { background: var(--ciel); } .m-Allemand { background: var(--lavande); } .m-Sciences { background: var(--menthe); }
@media (max-width: 760px) { .annees { grid-template-columns: 1fr; } }

.etapes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: e; }
.etape { background: #fff; border-radius: 1.5rem; padding: 1.25rem 1.4rem 1.4rem; text-align: center; }
.etape img { width: 6.5rem; height: 6.5rem; object-fit: contain; }
.etape h3 { font-size: 1.3rem; margin: .4rem 0 .3rem; }
.etape h3::before { counter-increment: e; content: counter(e) ". "; color: var(--turquoise); }
.etape p { margin: 0; color: var(--discret); font-size: .98rem; }
@media (max-width: 760px) { .etapes { grid-template-columns: 1fr; } .etape { display: grid; grid-template-columns: 5rem 1fr; text-align: left; align-items: center; gap: .25rem 1rem; } .etape img { width: 5rem; height: 5rem; grid-row: span 2; } }

.videos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.video { text-decoration: none; color: inherit; display: block; }
.video .vignette { position: relative; border-radius: 1rem; overflow: hidden; aspect-ratio: 16 / 9; background: #e9e2d0; }
.video .vignette img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.video:hover .vignette img { transform: scale(1.04); }
.video .vignette span { position: absolute; left: .5rem; bottom: .5rem; background: rgba(23, 68, 92, .85); color: #fff; font-size: .78rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px; }
.video .vignette .duree { left: auto; right: .5rem; }
.video h3 { font-size: 1.05rem; margin: .5rem 0 0; }
.video p { margin: .1rem 0 0; font-size: .88rem; color: var(--discret); }
@media (max-width: 900px) { .videos { grid-template-columns: repeat(2, 1fr); } }
.plus { margin-top: 1rem; }

.parents { background: var(--nuit); color: #fff; border-radius: 2rem; padding: 2.25rem 2.5rem; display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; }
.parents h2 { color: var(--jaune); font-size: 1.9rem; margin: 0 0 .9rem; }
.parents ul { margin: 0; padding: 0; list-style: none; }
.parents li { padding-left: 2rem; position: relative; margin: .55rem 0; }
.parents li::before { content: "★"; position: absolute; left: .2rem; color: var(--jaune); }
.parents .appel { background: rgba(255, 255, 255, .08); border-radius: 1.5rem; padding: 1.5rem; text-align: center; }
.parents .appel p { margin: 0 0 1rem; }
.parents .appel a.discret { display: block; margin-top: .8rem; color: #d7e6ee; font-size: .95rem; }
@media (max-width: 760px) { .parents { grid-template-columns: 1fr; padding: 1.75rem 1.4rem; } }

/* Page Vidéos */
.entete-page { margin-top: 2rem; }
.entete-page h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); margin: 0 0 .4rem; }
.sauts { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 0; }
.sauts a { text-decoration: none; font: 700 1rem "Baloo 2", sans-serif; background: #fff; border: 2px solid #f0e4c8; padding: .35rem 1rem; border-radius: 999px; }
.sauts a:hover { border-color: var(--jaune-fort); }
.annee-videos { margin-top: 2.75rem; }
.annee-videos > h2 { font-size: 2rem; margin: 0 0 .25rem; }
.matiere-videos { margin-top: 1.5rem; }
.matiere-videos > h3 { display: flex; align-items: center; gap: .55rem; font-size: 1.35rem; margin: 0 0 .8rem; }
.matiere-videos > h3 i { width: .9rem; height: .9rem; border-radius: 50%; display: inline-block; }
.bientot-bloc { background: #fbf6ea; border: 2px dashed #f0e4c8; border-radius: 1.5rem; padding: 1.25rem 1.5rem; color: var(--discret); display: flex; align-items: center; gap: 1rem; }
.bientot-bloc img { width: 4.5rem; height: auto; }

/* Pied de page commun */
.pied-site { margin-top: 3.5rem; border-top: 1px solid #eadfc4; }
.sb-in-pied { max-width: 64rem; margin: 0 auto; padding: 1.5rem 1.25rem 2.5rem; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; font-size: .95rem; color: var(--discret); }
.sb-in-pied a { color: var(--discret); }
.sb-in-pied .slogan { margin-left: auto; }
