/* ==========================================================
   Les Îles du Savoir — mini-site de l'application
   Polices hébergées ici (licence OFL) : aucun appel à un service tiers.
   ========================================================== */

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

:root {
  --sky-top: #8EDCFF;
  --sky-bottom: #3B8EF5;
  --blue: #1D5BB8;
  --blue-soft: #E3F2FF;
  --orange: #FF9A3C;
  --gold: #FFC93C;
  --paper: #F4FAFF;
  --card: #FFFFFF;
  --ink: #2B2D42;
  --muted: #5C6178;
  --line: #D6E6F7;
  --note: #FFF6DB;
  --todo: #FFE08A;

  --maths: #7B5CFF;
  --francais: #2FBF71;
  --anglais: #2E86FF;
  --histoire: #E0892B;
  --geo: #14B8A6;

  --radius: 22px;
  --shadow: 0 2px 4px rgba(29, 91, 184, .06), 0 12px 32px rgba(29, 91, 184, .12);
  --wrap: 1100px;
  --font-title: "Baloo 2", "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --blue: #8EC2FF;
    --blue-soft: #18304D;
    --paper: #0F1A2B;
    --card: #182740;
    --ink: #EAF0F8;
    --muted: #A9B4C6;
    --line: #26395A;
    --note: #2E2A1C;
    --todo: #6B5410;
    --shadow: 0 2px 4px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); font-weight: 700; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 800; line-height: 1.1; margin: 0 0 .4em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: 1.35rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 10; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.brand span { font-family: var(--font-title); font-size: 1.25rem; }
.main-nav { display: flex; gap: 18px; margin-left: auto; }
.main-nav a { text-decoration: none; color: var(--muted); font-weight: 800; font-size: .95rem; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--blue); }
@media (max-width: 760px) { .main-nav { display: none; } .brand { margin-right: auto; } }
.studio-link { font-size: .85rem; color: var(--muted); text-decoration: none; white-space: nowrap; }
.studio-link:hover { color: var(--blue); }

/* ---------- Accroche ---------- */
.hero {
  background:
    radial-gradient(circle at 72% 40%, rgba(255, 255, 255, .5), transparent 55%),
    linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
  color: #fff;
  overflow: hidden;
  position: relative;
}
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 32px; align-items: center; padding-top: 56px; padding-bottom: 72px; }
.hero h1 {
  font-size: clamp(2.8rem, 8vw, 5rem);
  color: #fff;
  -webkit-text-stroke: 0;
  text-shadow: 0 4px 0 var(--blue), 0 -2px 0 var(--blue), 3px 0 0 var(--blue), -3px 0 0 var(--blue), 0 10px 24px rgba(0, 40, 100, .25);
  margin-bottom: 16px;
}
.hero .lead { font-size: 1.2rem; font-weight: 700; max-width: 34em; text-shadow: 0 1px 2px rgba(0, 40, 100, .35); }
.pill {
  display: inline-block; background: var(--gold); color: #6B3A06; border: 3px solid #D9921A;
  border-radius: 999px; padding: 4px 18px; font-weight: 900; margin-bottom: 18px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; align-items: center; }
.soon {
  display: inline-flex; align-items: center; gap: 10px; background: #0F1A2B; color: #fff;
  border-radius: 14px; padding: 10px 18px; font-weight: 800; text-decoration: none;
}
.soon small { display: block; font-size: .7rem; letter-spacing: .08em; opacity: .8; font-weight: 700; }
.btn-light {
  background: #fff; color: var(--blue); border-radius: 14px; padding: 12px 20px; text-decoration: none; font-weight: 900;
}
.phone {
  justify-self: center; width: min(300px, 80vw); aspect-ratio: 9 / 16; border-radius: 36px; padding: 10px;
  background: #1C2433; box-shadow: 0 30px 60px rgba(0, 40, 100, .35); transform: rotate(3deg); position: relative;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 28px; display: block; }
.phone .bao-peek { position: absolute; width: 110px; height: 110px; left: -56px; bottom: 40px; transform: rotate(-10deg); filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .2)); border-radius: 0; }
.clouds { position: absolute; left: 0; right: 0; bottom: -2px; height: 70px; display: block; }
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 36px; }
  .phone { width: min(240px, 70vw); }
  .phone .bao-peek { width: 80px; height: 80px; left: -36px; }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.alt { background: var(--card); border-block: 1px solid var(--line); }

.islands { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.islands li {
  background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  border-top: 8px solid var(--c);
}
.alt .islands li { background: var(--paper); }
.islands strong { display: block; font-family: var(--font-title); font-size: 1.3rem; color: var(--c); }
.islands em { display: block; font-style: normal; font-weight: 800; margin-bottom: 6px; }
.islands span { color: var(--muted); font-size: .95rem; }

.stats { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stats li { background: var(--blue-soft); border-radius: 18px; padding: 16px; text-align: center; }
.stats strong { display: block; font-family: var(--font-title); font-size: 2.2rem; color: var(--blue); line-height: 1; }
.stats span { font-weight: 700; color: var(--muted); }

.exercises { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.exercises li { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow); font-weight: 800; }
.exercises svg { flex: none; width: 36px; height: 36px; padding: 7px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.ticks { list-style: none; padding: 0; margin: 16px 0 0; }
.ticks li { position: relative; padding-left: 34px; margin: 10px 0; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 22px; height: 22px; border-radius: 50%;
  background: var(--francais) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 15px no-repeat;
}

.bestiary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.bestiary figure { margin: 0; background: var(--card); border-radius: 18px; padding: 10px 6px 8px; text-align: center; box-shadow: var(--shadow); }
.alt .bestiary figure { background: var(--paper); }
.bestiary img { width: 100%; max-width: 96px; aspect-ratio: 1; display: block; margin: 0 auto; }
.bestiary figcaption { font-weight: 800; font-size: .8rem; color: var(--muted); }
@media (max-width: 480px) { .bestiary { grid-template-columns: repeat(3, 1fr); } .bestiary figure:nth-child(n+7) { display: none; } }
.bao-quote { display: flex; gap: 16px; align-items: center; margin-top: 24px; }
.bao-quote img { width: 96px; height: 96px; flex: none; }
.bubble { background: var(--card); border-radius: 20px; padding: 14px 18px; box-shadow: var(--shadow); font-weight: 800; position: relative; }
.alt .bubble { background: var(--paper); }

.parents-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.parents-grid li { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.parents-grid h3 { color: var(--blue); }
.parents-grid p { margin: 0; color: var(--muted); }

.privacy-band { background: var(--note); border-radius: var(--radius); padding: 28px; margin-top: 32px; }
.privacy-band h3 { margin-bottom: 8px; }

/* ---------- Politique ---------- */
.doc { max-width: 780px; margin: 0 auto; padding: 40px 16px 72px; }
.doc header { text-align: center; margin-bottom: 24px; }
.doc header img { width: min(360px, 90%); }
.doc h1 { font-size: clamp(2rem, 6vw, 2.8rem); color: var(--blue); }
.doc .date { color: var(--muted); margin: 0; }
.doc h2 { font-size: 1.4rem; color: var(--blue); margin: 28px 0 8px; }
.doc section, .doc .summary { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 4px 22px 14px; margin: 16px 0; }
.doc .summary { background: var(--note); }
.doc table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.doc th { color: var(--muted); font-weight: 800; }
.table-wrap { overflow-x: auto; }
.todo { background: var(--todo); border-radius: 4px; padding: 0 4px; font-weight: 800; }

/* ---------- Pied de page ---------- */
.site-footer { background: #0F2438; color: #DCE6F2; padding: 40px 0 28px; font-size: .95rem; }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.site-footer a { color: #fff; }
.site-footer h4 { margin: 0 0 8px; font-family: var(--font-title); font-size: 1.1rem; color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; }
.site-footer p { margin: 0; color: #A9B8CA; }
.footer-bottom { grid-column: 1 / -1; border-top: 1px solid #24405C; padding-top: 16px; color: #8597AD; font-size: .85rem; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }
