/* Poléo — site vitrine (poleo.kapex.app)
 *
 * Même système que l'app (« Terrain de jeu ») : crème, encre, contours
 * épais, ombres dures, une seule famille (Figtree). Aucun bleu, aucun rouge :
 * une couleur ne désigne jamais un camp.
 *
 * Un seul mouvement automatique sur toute la page : le caméléon du haut qui
 * change de couleur, synchronisé avec la phrase qui le dit. Coupé quand le
 * système demande de réduire les animations.
 */

@font-face { font-family: Figtree; font-weight: 500; font-display: swap; src: url(fonts/Figtree-Medium.ttf) format("truetype"); }
@font-face { font-family: Figtree; font-weight: 600; font-display: swap; src: url(fonts/Figtree-SemiBold.ttf) format("truetype"); }
@font-face { font-family: Figtree; font-weight: 800; font-display: swap; src: url(fonts/Figtree-ExtraBold.ttf) format("truetype"); }
@font-face { font-family: Figtree; font-weight: 900; font-display: swap; src: url(fonts/Figtree-Black.ttf) format("truetype"); }

:root {
  --cream: #FFF8EC;
  --card: #FFFFFF;
  --sand: #EFEADB;
  --locked: #E7E2D6;
  --ink: #16261C;
  --text-2: #3E4F45;
  --text-3: #5B6B60;
  --lime: #3FBF6E;
  --lime-pale: #DFF3E4;
  --lime-text: #2F7A4E;
  --amber: #FFB020;
  --amber-pale: #FFE9BC;
  --amber-text: #8A6206;
  --lilac: #B49BD8;
  --lilac-pale: #EFE7F6;
  --lilac-text: #6B5292;

  --gutter: clamp(16px, 5vw, 56px);
  --measure: 34rem;
  --radius-card: 22px;
  --radius-pill: 999px;
  --stroke: 2px;
  --shadow: 0 5px 0 var(--ink);
  --hue-period: 7.2s;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 500 1.0625rem/1.6 Figtree, system-ui, sans-serif;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }

h1, h2, h3 { margin: 0; font-weight: 900; letter-spacing: -0.025em; line-height: 1.05; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; }
.lede { font-size: clamp(1.0625rem, 1.8vw, 1.25rem); color: var(--text-2); max-width: var(--measure); text-wrap: pretty; }

/* ── En-tête ─────────────────────────────────────────────────────────────── */

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 1.375rem; letter-spacing: -0.02em; }
.brand img { width: 40px; height: 40px; border: var(--stroke) solid var(--ink); border-radius: 12px; background: var(--lime-pale); }

/* ── Boutons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  border: var(--stroke) solid var(--ink); border-radius: 16px;
  font: 900 1rem/1 Figtree, sans-serif; text-decoration: none;
  background: var(--lime); color: var(--ink); box-shadow: var(--shadow);
  transition: transform .09s ease-out, box-shadow .09s ease-out;
}
.btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--ink); }
.btn.quiet { background: var(--card); }
.btn.soon { background: var(--card); box-shadow: none; cursor: default; color: var(--text-2); }

/* ── Le haut de page : la promesse ───────────────────────────────────────── */

.hero { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 32px; padding-block: 24px 72px; }
.hero h1 { font-size: clamp(2.9rem, 7.6vw, 5.6rem); line-height: .98; letter-spacing: -0.04em; }
.hero h1 .shift { display: block; color: var(--lime-text); animation: words var(--hue-period) infinite; }
.hero .lede { margin-top: 24px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.stage { position: relative; justify-self: center; width: min(400px, 100%); aspect-ratio: 1 / 1.08; }
.stage img { position: absolute; inset: 0 0 8% 0; width: 100%; height: auto; animation: show var(--hue-period) infinite; }
.stage .amber { animation-delay: calc(var(--hue-period) * -2 / 3); }
.stage .lilac { animation-delay: calc(var(--hue-period) * -1 / 3); }
.stage::after {
  content: ""; position: absolute; left: 22%; right: 22%; bottom: 6%; height: 7%;
  border-radius: 50%; background: rgba(22, 38, 28, .10);
}

/* Le fondu dure ~0,3 s sur 2,4 s par couleur : à mi-chemin, deux teintes
   superposées donnent un ton boueux, il ne doit pas s'attarder. */
@keyframes show {
  0%, 31% { opacity: 1; }
  35%, 96% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes words {
  0%, 31% { color: var(--lime-text); }
  35%, 64% { color: var(--amber-text); }
  68%, 96% { color: var(--lilac-text); }
  100% { color: var(--lime-text); }
}

/* ── Les questions qu'on n'ose pas poser ─────────────────────────────────── */

.section { padding-block: clamp(56px, 9vw, 104px); }
.section > .wrap > h2 + .lede { margin-top: 18px; }

.thread { display: grid; gap: 14px; margin-top: 44px; max-width: 760px; }
.ask, .answer {
  max-width: 34rem; padding: 16px 20px; border-radius: 22px; font-size: 1.0625rem; line-height: 1.5;
}
.ask { justify-self: end; background: var(--ink); color: #fff; font-weight: 600; border-bottom-right-radius: 6px; }
.answer {
  display: flex; gap: 14px; align-items: flex-end; justify-self: start;
  background: var(--card); border: var(--stroke) solid var(--ink); border-bottom-left-radius: 6px;
  margin-bottom: 18px;
}
.answer img { flex: none; width: 44px; height: 44px; border: var(--stroke) solid var(--ink); border-radius: 12px; background: var(--lime-pale); }

/* ── Le parcours : douze chapitres, dans l'ordre ─────────────────────────── */

.path { list-style: none; margin: 48px 0 0; padding: 0; display: grid; gap: 18px; max-width: 820px; counter-reset: chapitre; }
.path li { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: center; counter-increment: chapitre; }
.path li:nth-child(4n + 2) { margin-left: clamp(0px, 6vw, 72px); }
.path li:nth-child(4n + 3) { margin-left: clamp(0px, 12vw, 144px); }
.path li:nth-child(4n + 4) { margin-left: clamp(0px, 6vw, 72px); }
.path li::before {
  content: counter(chapitre);
  display: grid; place-items: center; width: 64px; height: 64px;
  border: var(--stroke) solid var(--ink); border-radius: 20px;
  font-weight: 900; font-size: 1.375rem;
  box-shadow: 0 6px 0 var(--ink);
}
.path li.base::before { background: var(--lime); }
.path li.actu::before { background: var(--amber); }
.path p { color: var(--text-2); font-size: 1rem; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; color: var(--text-3); font-size: .9375rem; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 14px; border: var(--stroke) solid var(--ink); border-radius: 5px; }

/* ── L'app, en bande ─────────────────────────────────────────────────────── */

.band { margin-top: 40px; overflow-x: auto; scroll-snap-type: x proximity; border-block: var(--stroke) solid var(--ink); background: var(--cream); }
.band picture, .band img { display: block; height: clamp(440px, 62vw, 680px); width: auto; max-width: none; }
.band-hint { margin-top: 12px; color: var(--text-3); font-size: .9375rem; }

/* ── Ce que Poléo s'interdit ─────────────────────────────────────────────── */

.rules { list-style: none; margin: 44px 0 0; padding: 0; border-top: var(--stroke) solid var(--ink); max-width: 860px; }
.rules li { display: grid; grid-template-columns: minmax(0, 15rem) 1fr; gap: 8px 32px; padding: 22px 0; border-bottom: var(--stroke) solid var(--ink); }
.rules h3 { font-size: 1.1875rem; }
.rules p { color: var(--text-2); }

/* ── Pour les profs ──────────────────────────────────────────────────────── */

.class {
  display: grid; grid-template-columns: 1fr auto; gap: 24px 40px; align-items: center;
  padding: clamp(28px, 5vw, 48px); border: var(--stroke) solid var(--ink); border-radius: 28px;
  background: var(--lilac-pale); box-shadow: 0 8px 0 var(--ink);
}
.class .lede { margin-top: 14px; color: var(--ink); }
.class img { width: clamp(120px, 18vw, 180px); }

/* ── Questions fréquentes ────────────────────────────────────────────────── */

.faq { margin-top: 36px; max-width: 760px; border-top: var(--stroke) solid var(--ink); }
.faq details { border-bottom: var(--stroke) solid var(--ink); }
.faq summary { cursor: pointer; padding: 20px 40px 20px 0; font-weight: 800; font-size: 1.125rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-weight: 900; font-size: 1.6rem; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 22px; color: var(--text-2); max-width: var(--measure); }

/* ── Pied de page ────────────────────────────────────────────────────────── */

.foot { padding-block: 40px 56px; border-top: var(--stroke) solid var(--ink); margin-top: clamp(56px, 9vw, 104px); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 32px; color: var(--text-3); font-size: .9375rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }

/* ── Pages de texte (confidentialité, conditions) ────────────────────────── */

.doc { padding-block: 24px 40px; max-width: 46rem; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 12px; }
.doc .updated { color: var(--text-3); font-size: .9375rem; margin-bottom: 36px; }
.doc h2 { font-size: 1.6rem; margin: 44px 0 14px; }
.doc h3 { margin: 28px 0 10px; }
.doc p, .doc li { color: var(--text-2); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .9688rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--locked); }
.doc th { font-weight: 800; border-bottom: var(--stroke) solid var(--ink); }
.doc .table-wrap { overflow-x: auto; }

/* ── Petits écrans ───────────────────────────────────────────────────────── */

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 8px; }
  .stage { grid-row: 1; width: min(240px, 70%); justify-self: start; }
  .rules li { grid-template-columns: 1fr; }
  .class { grid-template-columns: 1fr; }
  .class img { grid-row: 1; }
  .top .btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero h1 .shift, .stage img { animation: none; }
  .stage .amber, .stage .lilac { display: none; }
  .btn { transition: none; }
}
