/* Site vitrine : thème pastel de l'appli (fond menthe, bleu brume, cubes de l'écran de connexion ; packages/themes, `nursery`).
   Animations en CSS seulement (aucun script) ; coupées si le visiteur réduit les animations. */
@font-face { font-family: "Mali"; src: url("/fonts/Mali_600SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "MaliHand"; src: url("/fonts/Mali_700Bold_Italic.ttf") format("truetype"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("/fonts/PlusJakartaSans_400Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("/fonts/PlusJakartaSans_600SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url("/fonts/PlusJakartaSans_700Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --cream: #F2FAF6;
  --mist: #E1EEF9;
  --night: #1E2A4A;
  --night-dark: #141D36;
  --coral: #FF8A5B;
  --sun-pale: #FCEFC7;
  --ink: #1D2B38;
  --muted: #4F5F6E;
  --surface: #FFFFFF;
  --line: #E5DCCD;
  --primary: #29628F;
  --primary-dark: #1F5079;
  --primary-soft: #DCEBF7;
  --blue: #C3DBF3;
  --pink: #F7C6CF;
  --mint: #BFE6D3;
  --mint-mark: #2F7A57;
  --sun: #F9D98C;
  --sun-mark: #8A6114;
  --lilac: #E3DAF5;
  --danger-soft: #FBE3E1;
  --danger: #A33A2C;
  --device: #1D2B38;
  --radius: 24px;
  --shadow: 0 18px 40px rgba(20, 45, 70, 0.18);
  --heading: "Mali", "Jakarta", system-ui, sans-serif;
  --body: "Jakarta", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 17px/1.6 var(--body); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--heading); font-weight: 600; line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); text-align: center; margin-bottom: 40px; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 12px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.wrap-narrow { max-width: 820px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 16px; border-radius: 12px; z-index: 20; }
.skip:focus { left: 16px; }
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 12px 28px; border-radius: 999px; font-weight: 700; font-size: 1.05rem; text-decoration: none; transition: transform 150ms, box-shadow 150ms, background 150ms; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--night); color: #FFFFFF; box-shadow: 0 8px 20px rgba(30, 42, 74, 0.25); }
.btn-primary:hover { background: var(--night-dark); }
.btn-soft { background: var(--surface); color: var(--primary); border: 2px solid var(--primary-soft); }
.btn-small { min-height: 44px; padding: 8px 18px; font-size: 0.95rem; }

/* En-tête : posé sur le bleu à l'accueil, sur le crème ailleurs */
.site-header { position: relative; z-index: 5; }
.page-home .site-header { position: absolute; inset: 0 0 auto; color: var(--night); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-family: var(--heading); font-size: 1.55rem; }
.brand img { border-radius: 12px; }
.nav-desktop { margin-left: auto; }
.nav-desktop ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-desktop a { color: inherit; text-decoration: none; font-weight: 600; opacity: 0.92; }
.nav-desktop a:hover { opacity: 1; text-decoration: underline; }
.page-text .site-header { border-bottom: 1px solid var(--line); }

/* Première vue : bleu brume qui finit en vague douce, titre bleu nuit centré, motifs de l'écran de connexion */
.hero { position: relative; isolation: isolate; padding: 120px 0 0; color: var(--night); text-align: center; }
.hero-bg { position: absolute; inset: 0 0 30% 0; z-index: -2; background: var(--mist); }
.hero-wave { position: absolute; left: 0; top: 100%; width: 100%; height: 110px; fill: var(--mist); }
.hero-text { max-width: 980px; }
.hero-badge { display: inline-block; background: var(--sun-pale); color: #5C4108; font-weight: 700; font-size: 0.92rem; padding: 6px 16px; border-radius: 999px; margin-bottom: 22px; }
.hero h1 { font-size: clamp(2.3rem, 6.4vw, 4.6rem); line-height: 1.08; margin: 0 auto 20px; max-width: 920px; color: var(--night); }
.hand { position: relative; display: inline-block; font-family: "MaliHand", var(--heading); font-style: italic; font-weight: 700; color: var(--coral); padding: 0 4px; }
.hand-line { position: absolute; left: 0; right: 0; bottom: -0.12em; width: 100%; height: 0.32em; fill: none; stroke: var(--coral); stroke-width: 7; stroke-linecap: round; }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 640px; margin: 0 auto 28px; color: var(--muted); }
.hero .note { font-size: 0.92rem; color: var(--muted); margin-top: 14px; }

.motifs { position: absolute; inset: 0 0 30% 0; z-index: -1; pointer-events: none; }
.motif { position: absolute; overflow: visible; }
.motif-1 { right: 7%; top: 96px; width: 104px; height: 104px; }
.motif-2 { left: 9%; top: 150px; width: 58px; height: 58px; transform: rotate(-14deg); }
.motif-3 { left: 25%; top: 96px; width: 34px; height: 34px; transform: rotate(12deg); }
.motif-4 { left: 5%; top: 300px; width: 92px; height: 98px; transform: rotate(-10deg); }
.motif-5 { right: 6%; top: 300px; width: 84px; height: 90px; transform: rotate(9deg); }
.motif-6 { left: 17%; top: 430px; width: 58px; height: 62px; transform: rotate(-6deg); }
.motif-7 { right: 27%; top: 470px; width: 30px; height: 30px; transform: rotate(-8deg); }
.motif-8 { right: 16%; top: 440px; width: 40px; height: 40px; transform: rotate(16deg); }

.devices { position: relative; max-width: 1060px; margin-top: 56px; padding-bottom: 24px; }
.device { margin: 0; }
.device .screen { overflow: hidden; background: #FFFFFF; }
.device-laptop { position: relative; width: 70%; margin: 0 auto; }
.device-laptop .screen { border: 10px solid var(--device); border-bottom-width: 14px; border-radius: 18px 18px 6px 6px; box-shadow: var(--shadow); }
.device-laptop::after { content: ""; display: block; height: 14px; margin: 0 -7%; background: linear-gradient(#D9DEE4, #AEB6BF); border-radius: 0 0 22px 22px; box-shadow: 0 10px 18px rgba(20, 45, 70, 0.18); }
.device-tablet { position: absolute; left: 6%; bottom: 6%; width: 34%; }
.device-tablet .screen { border: 12px solid var(--device); border-radius: 26px; box-shadow: var(--shadow); }
.device-phone .screen { border: 7px solid var(--device); border-radius: 30px; box-shadow: var(--shadow); }
.devices .device-phone { position: absolute; right: 2%; bottom: 0; width: 17%; }
.devices .device-phone .screen img { border-radius: 22px; }
.mascot { position: absolute; left: -9%; bottom: -2%; width: 12.5%; margin: 0; z-index: 2; }
.mascot img, .final-mascot img { width: 100%; }
.mascot-cheer { position: absolute; left: 74%; top: 2%; width: 24%; height: auto; aspect-ratio: 1; overflow: visible; fill: none; stroke: #FF8A5B; stroke-width: 10; stroke-linecap: round; }

/* Pastilles flottantes */
.float-pill { position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 16px 8px 8px; background: #FFFFFF; color: var(--ink); border-radius: 999px; font-weight: 700; font-size: 0.92rem; white-space: nowrap; box-shadow: 0 10px 24px rgba(20, 45, 70, 0.16); }
.float-pill .badge { width: 34px; height: 34px; border-radius: 50%; margin: 0; }
.float-pill .icon { width: 18px; height: 18px; }
.float-pill-1 { left: 8%; top: -4%; }
.float-pill-2 { right: 6%; top: 8%; }
.float-pill-3 { left: 40%; bottom: -2%; }
.float-pill-4 { right: 20%; top: 46%; }

/* Bénéfices sous la première vue */
.benefits { padding: 40px 0 24px; }
.benefit-grid { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.benefit-grid li { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border-radius: 20px; padding: 20px; }
.benefit-grid h2 { font-size: 1.05rem; text-align: left; margin: 0 0 4px; }
.benefit-grid p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.45; }
.benefit-grid .badge { margin: 0; }

/* Sections */
section { padding: 80px 0; }
.badge { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); margin-bottom: 14px; flex: none; }
.badge .icon { width: 24px; height: 24px; }
.badge-attendance, .badge-billing, .badge-arrival { background: var(--blue); color: #1F4E77; }
.badge-daily, .badge-team, .badge-meal, .badge-privacy { background: var(--mint); color: var(--mint-mark); }
.badge-photos, .badge-skills, .badge-parents { background: var(--pink); color: #8C3446; }
.badge-messages, .badge-network, .badge-nap { background: var(--lilac); color: #5B4B9A; }
.badge-life, .badge-preregistration { background: var(--sun); color: var(--sun-mark); }

.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 860px; margin: 0 auto; }
.compare-col { border-radius: var(--radius); padding: 28px; }
.compare-before { background: #FFFFFF; }
.compare-after { background: var(--primary-soft); }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .icon { margin-top: 2px; border-radius: 50%; padding: 3px; width: 24px; height: 24px; stroke-width: 2.6; }
.ticks-check .icon { background: var(--mint); color: var(--mint-mark); }
.ticks-cross .icon { background: var(--danger-soft); color: var(--danger); }

.roles { background: var(--surface); }
.role { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 32px 0; }
.role-flip .role-text { order: 2; }
.role .pill { display: inline-block; font-weight: 700; font-size: 0.9rem; padding: 6px 14px; border-radius: 999px; }
.role-direction .pill { background: var(--blue); color: #1F4E77; }
.role-team .pill { background: var(--pink); color: #7D2F3E; }
.role-parents .pill { background: var(--sun); color: #5C4108; }
.role h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 20px; }
.role-shot { display: flex; justify-content: center; padding: 36px; border-radius: 32px; }
.role-direction .role-shot { background: var(--blue); }
.role-team .role-shot { background: var(--pink); }
.role-parents .role-shot { background: var(--sun); }
.role-shot .device-laptop { width: 100%; }
.role-shot .device-phone { width: min(250px, 62%); }

.feature-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 22px; transition: transform 200ms, box-shadow 200ms; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(20, 45, 70, 0.08); }
.card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.card p { color: var(--muted); margin: 0; font-size: 0.93rem; line-height: 1.45; }
.morocco { margin-top: 32px; background: linear-gradient(120deg, var(--mint), var(--blue)); border-radius: var(--radius); padding: 28px 32px; display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; }
.morocco h3 { margin: 0; font-size: 1.4rem; }
.morocco .ticks { grid-template-columns: 1fr 1fr; }
.morocco .ticks-check .icon { background: var(--surface); }

.security { background: var(--surface); }
.security-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.security-grid li { display: flex; gap: 16px; background: var(--cream); border-radius: var(--radius); padding: 22px; }
.security-grid .badge { margin: 0; }
.security-grid h3 { font-size: 1.05rem; margin-bottom: 4px; }
.security-grid p { color: var(--muted); margin: 0; font-size: 0.95rem; line-height: 1.45; }
.more { text-align: center; margin-top: 32px; font-weight: 600; }

.faq-item { background: var(--surface); border-radius: 18px; margin-bottom: 12px; }
.faq-item summary { cursor: pointer; list-style: none; padding: 18px 56px 18px 22px; font-weight: 700; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 1.3rem; line-height: 1; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 22px 20px; margin: 0; color: var(--muted); }

.final { padding-top: 40px; }
.final-box { position: relative; text-align: center; background: var(--mist); color: var(--night); border-radius: 40px; padding: 56px 24px; }
.final-box h2 { margin-bottom: 8px; }
.final-box p { font-size: 1.1rem; margin-bottom: 24px; color: var(--muted); }
.final-mascot { position: absolute; left: 4%; bottom: 16px; width: 120px; margin: 0; }
.final-box { padding-left: 160px; padding-right: 160px; }

/* Pied de page */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 24px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; }
.footer-brand { display: flex; gap: 12px; align-items: center; }
.footer-brand img { border-radius: 10px; }
.footer-brand p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; }
.footer-small { margin-top: 24px; font-size: 0.85rem; color: var(--muted); }
.footer-small p { margin: 0 0 4px; }

/* Pages légales et page introuvable */
.legal { padding-top: 40px; padding-bottom: 72px; }
.legal section { padding: 0; margin-top: 36px; }
.legal h1 { margin-top: 12px; font-size: clamp(2rem, 5vw, 2.8rem); }
.legal h2 { text-align: left; font-size: 1.4rem; margin-bottom: 12px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal mark { background: var(--sun); border-radius: 6px; padding: 0 4px; }
.toc { background: var(--surface); border-radius: 20px; padding: 20px 24px; margin-top: 24px; }
.toc h2 { font-size: 1.1rem; }
.toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.toc li { margin-bottom: 4px; break-inside: avoid; }
.back { font-weight: 600; }
.not-found { text-align: center; padding: 96px 0; }

/* Animations courtes et discrètes : appareils qui se posent à l'ouverture (0,4 s, quelques pixels), pastilles qui flottent
   à peine (2 px), sections qui apparaissent en 0,35 s (classe posée par reveal.js). Rien si le visiteur réduit les animations. */
@keyframes settle { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes float { from { translate: 0 0; } to { translate: 0 -2px; } }

@media (prefers-reduced-motion: no-preference) {
  .devices .device-laptop { animation: settle 400ms ease-out both; }
  .devices .device-tablet { animation: settle 400ms 80ms ease-out both; }
  .devices .device-phone { animation: settle 400ms 160ms ease-out both; }
  .mascot { animation: settle 400ms 200ms ease-out both; }
  .float-pill { animation: appear 300ms 300ms ease-out both, float 4s 700ms ease-in-out infinite alternate; }
  .float-pill-2 { animation-delay: 350ms, 1.6s; }
  .float-pill-3 { animation-delay: 400ms, 1.1s; }
  .float-pill-4 { animation-delay: 450ms, 2.2s; }
  .reveal-ready .reveal { opacity: 0; transform: translateY(6px); transition: opacity 350ms ease-out, transform 350ms ease-out; }
  .reveal-ready .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
}

/* Tablette et téléphone */
@media (max-width: 1080px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .benefit-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .nav-desktop { display: none; }
  .header-cta { margin-left: auto; }
  .role { grid-template-columns: 1fr; gap: 28px; }
  .role-flip .role-text { order: 0; }
  .security-grid { grid-template-columns: 1fr 1fr; }
  .morocco { grid-template-columns: 1fr; gap: 16px; }
  .float-pill-4 { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  section { padding: 56px 0; }
  .header-cta { padding: 8px 14px; font-size: 0.88rem; }
  .brand { font-size: 1.3rem; }
  .hero { padding-top: 100px; }
  .hero-bg, .motifs { inset-block-end: 22%; }
  .hero-wave { height: 48px; }
  .hero .btn-primary { width: 100%; }
  .motif-1 { right: 2%; top: 84px; width: 56px; height: 56px; }
  .motif-2 { left: 3%; top: 92px; width: 34px; height: 34px; }
  .motif-3, .motif-4, .motif-5, .motif-6, .motif-7, .motif-8 { display: none; }
  .devices { margin-top: 36px; padding-bottom: 8px; }
  .device-laptop { width: 88%; }
  .device-laptop .screen { border-width: 5px 5px 7px; border-radius: 10px 10px 4px 4px; }
  .device-laptop::after { height: 8px; }
  .device-tablet { width: 44%; bottom: -4%; }
  .device-tablet .screen { border-width: 6px; border-radius: 14px; }
  .devices .device-phone { width: 26%; right: 0; bottom: -8%; }
  .device-phone .screen { border-width: 4px; border-radius: 18px; }
  .devices .device-phone .screen img { border-radius: 14px; }
  .mascot { width: 17%; left: 40%; bottom: -22%; }
  .float-pill { font-size: 0.78rem; padding: 5px 12px 5px 5px; gap: 6px; }
  .float-pill .badge { width: 26px; height: 26px; }
  .float-pill .icon { width: 14px; height: 14px; }
  .float-pill-1 { left: 0; top: -8%; }
  .float-pill-2 { right: 0; top: 4%; }
  .float-pill-3 { display: none; }
  .benefits { padding-top: 64px; }
  .compare-grid, .security-grid, .morocco .ticks { grid-template-columns: 1fr; }
  .benefit-grid { gap: 12px; }
  .benefit-grid li { flex-direction: column; gap: 10px; padding: 16px; }
  .benefit-grid h2 { font-size: 0.98rem; }
  .benefit-grid p { font-size: 0.88rem; }
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card { padding: 16px; }
  .role-shot { padding: 20px; }
  .final-box { padding: 40px 20px 200px; }
  .final-mascot { left: 50%; bottom: 12px; width: 96px; transform: translateX(-50%); }
  .toc ol { columns: 1; }
}
