/* DéfiFamille — site vitrine (§22.1), direction « Calme » (Q232, Q238): the app's colours and font. */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/atkinson_hyperlegible_next.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --background: #eef3ec;
  --surface: #ffffff;
  --surface-secondary: #f3f6f2;
  --ink: #1f3b2d;
  --ink-secondary: #5f7065;
  --border: #d5e0d6;
  --primary: #1f3b2d;
  --on-primary: #ffffff;
  --honey: #e8b04b;
  --honey-soft: #f8e7bf;
  --accent: #34619f;
  --success: #2c6e49;
  --radius-small: 14px;
  --radius: 18px;
  --radius-large: 22px;
  --width: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); font-weight: 800; margin-top: 0.4em; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 16px; }

.top {
  max-width: var(--width);
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.4rem; }
.top nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 700; }
.top nav a:hover { color: var(--accent); }

main { max-width: var(--width); margin: 0 auto; padding: 0 16px 48px; }
main > section { padding: 40px 0; }

/* Hero: the loop of the app's first screen (version A). */
.hero { display: grid; gap: 32px; align-items: center; grid-template-columns: 1.1fr 0.9fr; padding-top: 28px; }
.hero-text { min-width: 0; }
.lead { font-size: 1.2rem; color: var(--ink-secondary); max-width: 40rem; }
.small { font-size: 0.95rem; color: var(--ink-secondary); }
.loop { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 12px; }
.loop li { display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: 1.1rem; }
.loop .dot { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-weight: 800; color: #fff; background: var(--primary); }
.loop li:nth-child(2) .dot { background: #3d6fb6; }
.loop li:nth-child(3) .dot { background: var(--honey); color: var(--ink); }
.loop li:nth-child(4) .dot { background: var(--surface); color: var(--ink); border: 2px solid var(--ink); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 14px; }
.try .actions { justify-content: center; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: var(--radius-small);
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  min-height: 52px;
}
.button.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.button:hover { color: var(--ink); border-color: var(--ink); }
.button.primary:hover { color: var(--on-primary); background: #14281e; }

.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cards li { background: var(--surface); border-radius: var(--radius-large); padding: 24px; text-align: center; }
.cards img { display: block; margin: 0 auto 12px; }

.journey { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.journey li { text-align: center; }
.day { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 22px; }
.moment { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; background: var(--surface); border-radius: var(--radius-large); padding: 24px; }
.moment.text-only { grid-template-columns: 1fr; }
.moment > div { min-width: 0; }
.moment .phone { margin: 0; }
.moment h3 { margin: 0.2em 0 0.4em; font-size: 1.35rem; }
.time { margin: 0; color: var(--ink-secondary); font-weight: 700; font-size: 0.95rem; }
.actions-list { padding-left: 1.2em; color: var(--ink-secondary); }
.benefit { background: var(--honey-soft); border-radius: var(--radius-small); padding: 10px 14px; }
.changes { width: 100%; border-collapse: collapse; background: var(--surface); }
.changes thead th:last-child { color: var(--success); }
.try { text-align: center; background: var(--surface); border: 3px solid var(--honey); border-radius: var(--radius-large); padding: 28px 16px; margin: 32px 0; }
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .moment { grid-template-columns: 1fr; padding: 18px; }
  .moment .phone { max-width: 200px; margin: 0 auto; }
  .changes th, .changes td { padding: 6px; font-size: 0.95rem; }
}
.phone { margin: 0 auto 12px; max-width: 240px; border: 8px solid var(--ink); border-radius: 32px; overflow: hidden; background: var(--surface); }
.phone img { display: block; width: 100%; }
.number { display: inline-grid; place-items: center; width: 1.8em; height: 1.8em; border-radius: 50%; background: var(--honey); font-weight: 800; }

.method { background: var(--surface); border-radius: var(--radius-large); padding: 28px !important; margin: 20px 0; }
.ticks { padding-left: 1.2em; }
.ticks li { margin-bottom: 0.6em; }

.faq details { background: var(--surface); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq details p { margin: 10px 0 0; }

.prose { max-width: 46rem; margin: 0 auto; padding-top: 24px; }
.prose h2 { margin-top: 1.4em; }
.notice { background: var(--surface); border-left: 6px solid var(--honey); border-radius: 10px; padding: 14px 18px; }
.note { font-size: 0.95rem; color: var(--ink-secondary); border-top: 1px solid var(--border); padding-top: 14px; margin-top: 28px; }
.code { font-family: ui-monospace, monospace; font-size: 1.3rem; letter-spacing: 0.12em; }
.table { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; margin: 0 0 1em; font-size: 0.95rem; }
th, td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--surface-secondary); }
blockquote { margin: 0 0 1em; padding: 10px 18px; border-left: 4px solid var(--border); color: var(--ink-secondary); }

.bottom { border-top: 1px solid var(--border); padding: 24px 16px 36px; text-align: center; color: var(--ink-secondary); font-size: 0.95rem; }
.bottom nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-bottom: 12px; }
.bottom p { max-width: 46rem; margin: 0 auto; }

/* Hero (owner's review, Q238): the logo beside the title; the phone plays the loop of the game. */
.hero-title { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.hero-title h1 { margin: 0; }
.hero-logo { flex: none; width: 84px; height: 84px; }
.demo { margin: 0 auto; width: min(100%, 300px); text-align: center; }
.demo-phone { position: relative; padding: 9px; border-radius: 40px; background: var(--ink); }
.demo-screen { position: relative; display: block; width: 100%; padding: 0; border: 0; overflow: hidden; border-radius: 32px; aspect-ratio: 390 / 838; background: var(--background); cursor: pointer; }
.demo-shot { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.45s ease; }
.demo-shot.on { opacity: 1; }
.demo-tap { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgb(31 59 45 / 0.28); box-shadow: 0 0 0 3px rgb(255 255 255 / 0.95), 0 0 0 6px rgb(31 59 45 / 0.35); opacity: 0; transform: scale(0.6); pointer-events: none; transition: opacity 0.2s ease, transform 0.35s ease; }
.demo-tap.show { opacity: 1; transform: scale(1); }
.tap-1 { left: 50%; top: 85.5%; }
.tap-2 { left: 84%; top: 16%; }
.tap-3 { left: 70%; top: 92.5%; }
.tap-4 { left: 49.5%; top: 66%; }
.tap-5 { left: 53%; top: 30.5%; }
.tap-6 { left: 49%; top: 82.7%; }
.demo-pause { position: absolute; top: -12px; right: -12px; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--honey); color: var(--ink); fill: currentColor; cursor: pointer; }
.demo-pause svg { grid-area: 1 / 1; }
.demo-pause .icon-play, .demo-pause[aria-pressed="true"] .icon-pause { display: none; }
.demo-pause[aria-pressed="true"] .icon-play { display: block; }
.demo figcaption { margin: 16px auto 0; min-height: 4.8em; font-size: 0.98rem; color: var(--ink); }
.demo-who { display: inline-block; margin: 0 4px 4px 0; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 0.85rem; }

/* Who a moment or a screen is for: the child's side, the parents' side, the whole family. */
.side-child, .who-enfant { background: var(--honey-soft); color: var(--ink); }
.side-parent, .who-parent { background: #e3ecf8; color: #234c86; }
.who-famille { background: #dce8d9; color: var(--success); }
.who { display: inline-block; margin: 0 0 6px; padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: 0.85rem; }
.phone-figure { margin: 0; text-align: center; }
.phone-figure .phone { margin-bottom: 8px; }
.phone-figure figcaption { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; }
.screen-enfant { background: var(--honey-soft); color: var(--ink); }
.screen-parent { background: #e3ecf8; color: #234c86; }
.setup h2 { margin-top: 0; }

/* The ribbon of features: small white cards that scroll, still on hover, focus, pause or less motion. */
.ribbon { padding-top: 8px !important; }
.ribbon-frame { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ribbon-track { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 4px 0; list-style: none; }
.ribbon-track li { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 16px 8px 8px; background: var(--surface); border-radius: var(--radius); font-weight: 700; }
.ribbon-track li img { flex: none; }
.ribbon-track.moving { flex-wrap: nowrap; justify-content: flex-start; width: max-content; animation: ribbon 70s linear infinite; }
.ribbon-track.moving li { margin-right: 2px; white-space: nowrap; }
.ribbon-frame:hover .ribbon-track, .ribbon-frame:focus-within .ribbon-track, .ribbon-track.paused { animation-play-state: paused; }
@keyframes ribbon { to { transform: translateX(-50%); } }

/* The demo page: the two spaces side by side. */
.spaces-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 18px 0; }
.space { background: var(--surface); border-radius: var(--radius-large); padding: 22px; min-width: 0; }
.actions.centered { justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .demo-shot, .demo-tap { transition: none; }
  .ribbon-track.moving { animation: none; }
}
