/* Courbe de croissance — feuille de style
   Palette chaude et calme : papier, encre, vert-de-gris ; statuts lisibles sans dépendre de la couleur seule. */

:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f3f0ea;
  --ink: #1d2730;
  --muted: #5d6973;
  --line: #e4dfd6;
  --brand: #2f6f62;
  --brand-strong: #24584e;
  --brand-soft: #e3efeb;
  --accent: #c8643f;
  --ok: #2e7d4f;    --ok-soft: #e4f2e9;
  --watch: #a86a12; --watch-soft: #fbf0dc;
  --alert: #b42318; --alert-soft: #fbe6e3;
  --boy: #3f6fa8;   --boy-soft: rgba(63,111,168,.12);  --boy-soft2: rgba(63,111,168,.07);
  --girl: #a24c75;  --girl-soft: rgba(162,76,117,.12); --girl-soft2: rgba(162,76,117,.07);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29,39,48,.05), 0 4px 16px rgba(29,39,48,.05);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12171b; --surface: #1a2026; --surface-2: #222a31; --ink: #e7ebee; --muted: #9ba7b1; --line: #2f3940;
    --brand: #6cc2ad; --brand-strong: #8fd5c3; --brand-soft: #1d3330; --accent: #e58a63;
    --ok: #6cc28f; --ok-soft: #1b3226; --watch: #e0a54a; --watch-soft: #3a2d17; --alert: #f08070; --alert-soft: #3d1f1b;
    --boy: #7fa8db; --boy-soft: rgba(127,168,219,.16); --boy-soft2: rgba(127,168,219,.08);
    --girl: #d98cb0; --girl-soft: rgba(217,140,176,.16); --girl-soft2: rgba(217,140,176,.08);
    --shadow: 0 1px 2px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); }
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, .h3, .h4 { font-family: var(--serif); line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
h3, .h3 { font-size: 1.25rem; }
.h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.25rem 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46rem; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 560px; }
.section { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.section-head { margin-bottom: 1.25rem; }
.row-between { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 1rem 1.5rem; grid-template-columns: 1fr; }
.gap-lg { gap: 1.5rem; }
@media (min-width: 760px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1.3fr; align-items: start; }
}

/* ---------- En-tête ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.brand em { font-style: italic; font-weight: 400; color: var(--muted); }
.brand svg { width: 38px; height: 27px; fill: none; stroke-linecap: round; }
.b-axis { stroke: var(--line); stroke-width: 2; }
.b-curve { stroke: var(--brand); stroke-width: 3; }
.b-dot { fill: var(--accent); stroke: none; }
.site-nav { display: flex; align-items: center; gap: .25rem; }
.site-nav a { text-decoration: none; color: var(--ink); padding: .45rem .7rem; border-radius: 8px; font-size: .95rem; }
.site-nav a:hover, .site-nav a[aria-current] { background: var(--surface-2); }
.site-nav a.nav-cta { background: var(--brand); color: #fff; }
.site-nav a.nav-cta:hover { background: var(--brand-strong); }
@media (prefers-color-scheme: dark) { .site-nav a.nav-cta { color: #10201c; } }
.nav-toggle { display: none; }
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; background: none; border: 1px solid var(--line); border-radius: 8px; padding: .4rem .8rem; font: inherit; color: var(--ink); }
  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: .5rem 16px 1rem; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .7rem .8rem; }
}

/* ---------- Pied ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; padding: 2rem 0 3rem; background: var(--surface); }
.footer-inner { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1.4fr 1fr; } }
.footer-brand { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; margin-bottom: .25rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-content: start; }
.footer-links a { color: var(--muted); }

/* ---------- Héros ---------- */
.hero { background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; gap: 2rem; padding-top: 3rem; padding-bottom: 3rem; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.15fr .85fr; padding-top: 4.5rem; padding-bottom: 4.5rem; } }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 600; color: var(--brand); }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); max-width: 16ch; }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.5rem 0; }
.hero-figure { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.25rem; box-shadow: var(--shadow); }
.hero-chart { display: block; width: 100%; height: auto; }
.hc-band2 { fill: var(--boy-soft2); } .hc-band1 { fill: var(--boy-soft); }
.hc-mean { fill: none; stroke: var(--boy); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: .7; }
.hc-child { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.hc-dots circle { fill: var(--surface); stroke: var(--ink); stroke-width: 2.5; }
.hc-dots circle:last-child { fill: var(--accent); stroke: var(--accent); }
.hc-target circle { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.hc-target text { font: 600 12px var(--sans); fill: var(--accent); }
.hc-axis { fill: none; stroke: var(--line); stroke-width: 2; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: 600 1rem/1.2 var(--sans); padding: .75rem 1.2rem; border-radius: 10px; border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-strong); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary, .btn-primary:hover { color: #10201c; } }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--alert); color: #fff; }
.btn-lg { padding: .9rem 1.6rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-icon { background: none; border: 1px solid transparent; border-radius: 6px; width: 32px; height: 32px; font-size: 1.3rem; line-height: 1; color: var(--muted); cursor: pointer; }
.btn-icon:hover { border-color: var(--line); color: var(--alert); }

/* ---------- Cartes & encarts ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.5rem; }
@media (max-width: 520px) { .card { padding: 1.1rem; } }
.notice { background: var(--brand-soft); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.5rem 0; }
.cta-card { display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--brand-soft); border-radius: var(--radius); padding: 1.5rem; margin: 1.5rem 0; }
.cta-card p { margin: 0; max-width: 44rem; }
.danger-zone { border-color: color-mix(in srgb, var(--alert) 35%, var(--line)); }
.disclaimer { font-size: .9rem; color: var(--muted); border-left: 3px solid var(--line); padding-left: 1rem; margin-top: 2rem; max-width: 48rem; }
.flash { padding: .8rem 1.1rem; border-radius: 10px; margin: 1rem 0 0; background: var(--ok-soft); color: var(--ink); border-left: 4px solid var(--ok); }
.flash-error { background: var(--alert-soft); border-left-color: var(--alert); }
.flash-info { background: var(--brand-soft); border-left-color: var(--brand); }
.crumbs { margin-bottom: .75rem; font-size: .95rem; }
.crumbs a { text-decoration: none; }
.todo { background: var(--watch-soft); padding: .5rem .75rem; border-radius: 8px; }

/* ---------- Formulaires ---------- */
fieldset { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
legend { font-weight: 600; margin-bottom: .75rem; padding: 0; font-size: 1.02rem; }
.field { margin-bottom: 1rem; min-width: 0; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.field label, .field .label { display: block; font-weight: 500; margin-bottom: .35rem; font-size: .95rem; }
.opt { font-weight: 400; color: var(--muted); font-size: .85rem; }
input[type=text], input[type=email], input[type=password], input[type=date], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  border-radius: 10px; padding: .65rem .8rem; min-height: 46px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent); }
[aria-invalid=true] { border-color: var(--alert) !important; }
.field-error { color: var(--alert); font-size: .88rem; margin: .3rem 0 0; }
.form-alert { background: var(--alert-soft); color: var(--ink); border-radius: 10px; padding: .7rem 1rem; }
.hint { font-size: .85rem; color: var(--muted); margin: .35rem 0 0; }
.unit { position: relative; }
.unit input { padding-right: 2.8rem; }
.unit span { position: absolute; right: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .9rem; pointer-events: none; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); border-radius: 10px; overflow: hidden; min-height: 46px; }
.segmented label { display: flex; align-items: center; justify-content: center; margin: 0; cursor: pointer; padding: .55rem .5rem; font-weight: 500; position: relative; text-align: center; }
.segmented label + label { border-left: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented label:has(input:checked) { background: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .segmented label:has(input:checked) { color: #10201c; } }
.segmented label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: -3px; }
.check label { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: .2rem; flex: none; accent-color: var(--brand); }
.form-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; }
.form-actions p { margin: 0; }
.eval-form { padding: 1.75rem; }
.more { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: .5rem 0 1.25rem; padding: .25rem 0; }
.more summary { cursor: pointer; padding: .8rem 0; font-weight: 500; color: var(--brand); }
.more[open] summary { margin-bottom: .5rem; }
.hp { position: absolute; left: -9999px; }

/* ---------- Indicateurs ---------- */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.25rem; box-shadow: var(--shadow); border-top: 4px solid var(--line); }
.metric h3 { font-family: var(--sans); font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: .4rem; }
.metric-value { font-family: var(--serif); font-size: 2rem; font-weight: 600; margin: 0 0 .3rem; line-height: 1.1; }
.metric-value small { font-family: var(--sans); font-size: 1rem; font-weight: 400; color: var(--muted); }
.metric-badge { display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; font-weight: 600; padding: .25rem .6rem; border-radius: 999px; background: var(--surface-2); margin-bottom: .6rem; }
.metric-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.metric-text { font-size: .9rem; color: var(--muted); margin: 0; }
.metric-ok { border-top-color: var(--ok); }      .metric-ok .metric-badge { background: var(--ok-soft); }     .metric-ok .dot { background: var(--ok); }
.metric-watch { border-top-color: var(--watch); } .metric-watch .metric-badge { background: var(--watch-soft); } .metric-watch .dot { background: var(--watch); }
.metric-alert { border-top-color: var(--alert); } .metric-alert .metric-badge { background: var(--alert-soft); } .metric-alert .dot { background: var(--alert); }
.metric-neutral { border-top-color: var(--brand); }
.pill { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-watch { background: var(--watch-soft); color: var(--watch); }
.pill-alert { background: var(--alert-soft); color: var(--alert); }

/* ---------- Graphiques ---------- */
.charts { --c: var(--boy); --c-soft: var(--boy-soft); --c-soft2: var(--boy-soft2); }
.charts.girl { --c: var(--girl); --c-soft: var(--girl-soft); --c-soft2: var(--girl-soft2); }
.tabs { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 4px; gap: 2px; margin-bottom: 1rem; }
.tabs button { font: 600 .95rem var(--sans); border: 0; background: transparent; color: var(--muted); padding: .5rem 1rem; border-radius: 7px; cursor: pointer; }
.tabs button[aria-selected=true] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.tabs button:disabled { opacity: .4; cursor: not-allowed; }
.chart-frame { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .axis text { fill: var(--muted); font: 12px var(--sans); }
.chart .axis-title { fill: var(--muted); font: 12px var(--sans); }
.chart .band2 { fill: var(--c-soft2); }
.chart .band1 { fill: var(--c-soft); }
.chart .sd-line { fill: none; stroke: var(--c); stroke-width: 1; opacity: .35; }
.chart .mean { fill: none; stroke: var(--c); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: .75; }
.chart .child-line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .pt { fill: var(--surface); stroke: var(--ink); stroke-width: 2.25; }
.chart .pt.last { fill: var(--accent); stroke: var(--accent); }
.chart .pt.hover { r: 7; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .target circle { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }
.chart .target text { fill: var(--accent); font: 600 12px var(--sans); }
.chart .target line { stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 3 4; }
.chart .crosshair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.chart-tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--bg); font-size: .85rem; padding: .45rem .65rem; border-radius: 8px; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); box-shadow: var(--shadow); }
.chart-tip strong { display: block; }
.legend { list-style: none; padding: 0; margin: .75rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; font-size: .88rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: .45rem; }
.lg { display: inline-block; width: 22px; height: 10px; border-radius: 3px; }
.lg-child { height: 3px; background: var(--ink); }
.lg-mean { height: 0; border-top: 2px dashed var(--c); border-radius: 0; }
.lg-band1 { background: var(--c-soft); }
.lg-band2 { background: var(--c-soft2); outline: 1px solid var(--c-soft); }
.lg-tc { width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid var(--accent); }
.charts.bmi .lg-ref, .charts.weight .lg-target, .charts.bmi .lg-target { display: none; }

/* ---------- Espace enfant ---------- */
.child-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.child-head h1 { margin-bottom: .1rem; }
.child-head p { margin: 0; }
.child-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.sibling-tabs { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .75rem; }
.sibling-tabs a { text-decoration: none; padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); font-size: .92rem; }
.sibling-tabs a[aria-current] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sibling-tabs a.add { color: var(--brand); border-style: dashed; }
.child-cards { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.child-card { display: flex; flex-direction: column; gap: .2rem; padding: 1.25rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--boy); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.child-card.sex-2 { border-left-color: var(--girl); }
.child-card:hover { border-color: var(--brand); }
.cc-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }

/* ---------- Tableaux ---------- */
.table-scroll { overflow-x: auto; margin: 0 -.25rem; }
table.data { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.data th { text-align: left; font-weight: 600; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; padding: .5rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data form { margin: 0; }

/* ---------- Contenus ---------- */
.features { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.features article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.features h3 { font-size: 1.1rem; }
.features p { color: var(--muted); font-size: .95rem; margin: 0; }
.link-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.link-cards a { display: block; height: 100%; padding: 1rem 1.15rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 500; }
.link-cards a:hover { border-color: var(--brand); color: var(--brand); }
.prose { max-width: 42rem; }
.prose p, .prose li { font-size: 1.05rem; }
.prose h2 { margin-top: 2rem; }
.article-layout { display: grid; gap: 2.5rem; }
@media (min-width: 960px) { .article-layout { grid-template-columns: minmax(0, 1fr) 280px; } }
.article-aside ul { list-style: none; padding: 0; margin: 0; font-size: .93rem; }
.article-aside li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.article-aside a { text-decoration: none; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: .75rem; }
.faq summary { cursor: pointer; padding: 1rem 1.25rem; font-weight: 600; font-family: var(--serif); font-size: 1.1rem; }
.faq .prose { padding: 0 1.25rem 1rem; }

/* ---------- Illustrations des dossiers ---------- */
.prose h2 { font-size: 1.35rem; margin: 2rem 0 .6rem; }
.prose h3 { font-size: 1.15rem; margin: 1.6rem 0 .4rem; }
.prose ul { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose figure { margin: 1.5rem 0; text-align: center; }
.prose figure img { max-width: 100%; height: auto; border-radius: 10px; background: #fff; padding: .5rem; border: 1px solid var(--line); }
.prose figcaption { font-size: .9rem; color: var(--muted); margin-top: .5rem; }
.prose .figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.prose .figures figure { margin: 0; }
.prose .sex-block { border-left: 3px solid var(--line); padding-left: 1.25rem; margin: 2rem 0; }
.prose table.simple { border-collapse: collapse; margin: 1rem 0; font-variant-numeric: tabular-nums; }
.prose table.simple td { border: 1px solid var(--line); padding: .4rem .8rem; text-align: center; }
.prose table.simple tr:first-child td { font-weight: 600; background: var(--surface-2); }

/* ---------- Publicité ---------- */
.ad { margin: 2rem 0; padding: .75rem; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface); min-height: 120px; }
.ad-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .4rem; }
.ad ins.adsbygoogle { display: block; min-height: 90px; }

/* ---------- Déconnexion, questions, livres ---------- */
.nav-logout { margin: 0; display: inline; }
.nav-logout button { font: inherit; font-size: .95rem; background: none; border: 0; color: var(--muted); padding: .45rem .7rem; border-radius: 8px; cursor: pointer; }
.nav-logout button:hover { background: var(--surface-2); color: var(--ink); }
@media (max-width: 820px) { .nav-logout button { width: 100%; text-align: left; padding: .7rem .8rem; } }
.questions { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .questions { grid-template-columns: 1fr 1fr; } }
.questions article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.questions h2 { font-size: 1.2rem; }
.questions ul { margin: 0; padding-left: 1.2rem; }
.questions li { margin-bottom: .35rem; }

/* ---------- Correctifs mobile (iOS Safari) ---------- */
/* Les champs date d'iOS ont une largeur minimale native qui débordait de la colonne */
input[type=date] {
  -webkit-appearance: none; appearance: none;
  display: block; min-width: 0; max-width: 100%; width: 100%;
  text-align: left; line-height: 1.3;
}
input[type=date]::-webkit-date-and-time-value { text-align: left; margin: 0; }
input[type=date]::-webkit-calendar-picker-indicator { opacity: .6; }
.field-pair > .field, .field-pair input, .unit { min-width: 0; }
.unit input { width: 100%; }

@media (max-width: 520px) {
  body { font-size: 16px; }
  /* 16 px minimum : en dessous, iOS zoome automatiquement sur le champ */
  input[type=text], input[type=email], input[type=password], input[type=date], select, textarea {
    font-size: 16px; padding: .5rem .7rem; min-height: 44px; border-radius: 9px;
  }
  .segmented { min-height: 44px; }
  .segmented label { padding: .45rem .4rem; }
  .field { margin-bottom: .8rem; }
  .field label, .field .label { font-size: .9rem; margin-bottom: .25rem; }
  .field-pair { gap: .6rem; }
  .unit input { padding-right: 2.4rem; }
  .unit span { right: .7rem; font-size: .85rem; }
  .eval-form { padding: 1.1rem; }
  legend { font-size: .98rem; margin-bottom: .5rem; }
  .more summary { font-size: .98rem; padding: .7rem 0; }
  .hint { font-size: .8rem; }
  .btn-lg { width: 100%; }
}

/* ---------- Résultat modifiable ---------- */
.inline-form { margin-top: .9rem; padding-top: .9rem; border-top: 1px dashed var(--line); }
.inline-form .field { margin-bottom: .6rem; }
.inline-form .field label { font-size: .85rem; }
.btn-sm { padding: .55rem .9rem; font-size: .92rem; }
.edit-block { margin: 2rem 0; scroll-margin-top: 80px; }
#resultat { scroll-margin-top: 80px; }
.metrics .inline-form .field-pair:has(input[type=date]) { grid-template-columns: 1fr; }

/* Champs vides : tiret discret plutôt qu'un exemple chiffré qui ressemble à une valeur saisie */
input::placeholder { color: var(--muted); opacity: .45; letter-spacing: .05em; }
input:placeholder-shown:not(:focus) { border-style: dashed; }

/* ---------- Annonces à taille fixe ---------- */
.ad { min-height: 0; padding: .5rem; display: flex; flex-direction: column; align-items: center; background: transparent; border: 1px dashed var(--line); }
.ad-label { align-self: stretch; text-align: center; }
ins.adsbygoogle.ad-ins-banner { display: inline-block; width: 320px; height: 100px; }
@media (min-width: 780px) { ins.adsbygoogle.ad-ins-banner { width: 728px; height: 90px; } }
ins.adsbygoogle.ad-ins-rect { display: inline-block; width: 300px; height: 250px; }
.ad-rect { max-width: 340px; margin-left: auto; margin-right: auto; }
.aside-ad { display: none; margin-bottom: 1.5rem; }
@media (min-width: 960px) { .aside-ad { display: block; position: sticky; top: 84px; } }

/* ---------- Annonces : nettement séparées du contenu éditorial ---------- */
.ad {
  margin: 2.5rem auto; padding: .75rem .75rem 1rem; border: 0; border-radius: 12px;
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 12px, color-mix(in srgb, var(--surface-2) 70%, var(--bg)) 12px 24px);
  box-shadow: inset 0 0 0 1px var(--line);
}
.ad-banner { max-width: 760px; }
.ad-label { margin: 0 0 .6rem; font-size: .72rem; line-height: 1.35; letter-spacing: .02em; color: var(--muted); text-align: center; text-transform: none; }
.ad-label strong { text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.ad-label em { color: var(--watch); font-style: normal; font-weight: 600; }
.ad ins.adsbygoogle { background: var(--surface); }
@media (min-width: 960px) { .article-layout { grid-template-columns: minmax(0, 1fr) 336px; } }
.aside-ad .ad { margin: 0 0 1.5rem; padding: .6rem .6rem .8rem; max-width: 336px; }
/* Mention publicitaire : discrète et courte */
.ad-label { font-size: .68rem; letter-spacing: .03em; opacity: .75; margin-bottom: .4rem; }
.ad-label em { font-weight: 500; }

/* ---------- Références IMC ---------- */
.chart .zone-watch { fill: color-mix(in srgb, var(--watch) 14%, transparent); }
.chart .zone-alert { fill: color-mix(in srgb, var(--alert) 14%, transparent); }
.chart .cut { fill: none; stroke-width: 1.5; stroke-dasharray: 6 4; }
.chart .cut-thin { stroke: var(--muted); }
.chart .cut-watch { stroke: var(--watch); }
.chart .cut-alert { stroke: var(--alert); }
.bmi-ref { margin-top: .9rem; border-top: 1px solid var(--line); padding-top: .9rem; }
.bmi-ref-select { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; font-weight: 500; font-size: .92rem; margin-bottom: .6rem; }
.bmi-ref-select select { width: auto; min-height: 40px; padding: .35rem .6rem; font-size: .92rem; }
.bmi-ref p { margin: 0 0 .5rem; }
.bmi-ref .src { opacity: .8; font-style: italic; }

/* ---------- Partage ---------- */
.share { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.share-open { display: inline-flex; align-items: center; gap: .5rem; }
.share-panel { margin-top: .9rem; }
.share-note { margin: 0 0 .7rem; }
.share-buttons { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .7rem; }
.share-buttons a, .share-buttons button { font: 600 .9rem var(--sans); padding: .5rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; }
.share-buttons a:hover, .share-buttons button:hover { border-color: var(--brand); color: var(--brand); }
.share-buttons .share-native { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .share-buttons .share-native { color: #10201c; } }
.share-url { font-size: .85rem !important; color: var(--muted); }
.share-status { margin: .4rem 0 0; color: var(--ok); min-height: 1.2em; }
.promo { display: grid; gap: 1.25rem; align-items: center; background: var(--brand-soft); border-radius: var(--radius); padding: 1.75rem; margin: 2rem 0; }
@media (min-width: 820px) { .promo { grid-template-columns: 1fr auto; } }
.promo h2 { margin-bottom: .4rem; }
.promo ul { margin: .5rem 0 0; padding-left: 1.2rem; color: var(--muted); }

/* ---------- Période, lecture d'une mesure ---------- */
.charts .tabs { margin-bottom: .6rem; }
.zoom { display: flex; align-items: center; gap: .4rem; margin: 0 0 .8rem; font-size: .85rem; }
.zoom-label { color: var(--muted); line-height: 1.05; text-align: center; font-size: .8rem; }
.zoom-label small { font-size: .7rem; }
.zoom-btns { flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: .25rem; min-width: 0; }
.zoom button { font: 500 .85rem var(--sans); padding: .35rem .2rem; min-width: 0; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; }
.zoom button[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.zoom button:disabled { opacity: .35; cursor: default; }
.chart .target-note { fill: var(--accent); font: 600 12px var(--sans); }
.chart .sd-line.sd1 { opacity: .22; stroke-dasharray: 2 3; }
.chart .edge-labels text { fill: var(--c); font: 600 11px var(--sans); opacity: .85; }
.chart .edge-labels text.mean-l { font-weight: 500; }
.charts.bmi .chart .edge-labels text { fill: var(--muted); }
.chart .pt { stroke-width: 1.75; }
.chart .pt.sel { r: 6.5; stroke-width: 2.5; }
.chart .pt.last.sel { stroke: var(--ink); }
.chart .child-line { stroke-width: 2; }
.readout { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .5rem; margin: .6rem 0 0; padding: .65rem .5rem; background: var(--surface-2); border-radius: 12px; }
.readout[hidden] { display: none; }
.readout > button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.readout > button:disabled { opacity: .3; cursor: default; }
.ro-body { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .15rem; min-width: 0; }
.ro-val { font: 700 1.25rem var(--sans); color: var(--ink); }
.ro-when { font-size: .85rem; color: var(--muted); }
.ro-pos { font-size: .88rem; color: var(--ink); }
.ro-pos.ok strong { color: var(--ok); }
.ro-pos.watch strong { color: var(--watch); }
.ro-pos.alert strong { color: var(--alert); }
.ro-gauge { width: 100%; max-width: 280px; height: auto; margin-top: .2rem; }
.ro-gauge .g-band2 { fill: var(--c-soft2); stroke: var(--c-soft); }
.ro-gauge .g-band1 { fill: var(--c-soft); }
.ro-gauge .g-axis { stroke: var(--muted); stroke-width: 1; opacity: .5; }
.ro-gauge .g-tick { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.ro-gauge text { fill: var(--muted); font: 11px var(--sans); }
.ro-gauge .g-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.ro-hint { margin: .35rem 0 0; text-align: center; }
@media (min-width: 700px) {
  .charts { display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; }
  .charts > .tabs { grid-column: 1; }
  .charts > .zoom { grid-column: 2; justify-self: end; align-self: center; margin: 0 0 .6rem; width: min(100%, 360px); }
  .charts > :not(.tabs):not(.zoom) { grid-column: 1 / -1; }
}

/* ---------- Lien public d'un enfant ---------- */
.public-link-wrap { margin: -.25rem 0 1.2rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.public-link-wrap[hidden] { display: none; }
.public-link-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .7rem; }
.public-link-row .share-url { flex: 1; min-width: 0; }
.public-link-row .btn { flex: none; white-space: nowrap; }
.public-link .share-buttons { margin-bottom: .2rem; }
.public-link-status:empty { display: none; }

/* ---------- Administration : fréquentation ---------- */
.admin-jump { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.5rem; }
.admin-periods { display: flex; gap: .3rem; }
.admin-periods .pill { font: 500 .85rem var(--sans); padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.admin-periods .pill[aria-pressed=true] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.traffic-chart { width: 100%; height: auto; display: block; margin: .5rem 0; }
.traffic-chart .b-all { fill: var(--brand); opacity: .35; }
.traffic-chart .b-mem { fill: var(--brand); pointer-events: none; }
.traffic-chart .b-axis { stroke: var(--line); }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--brand); vertical-align: middle; }
.key-all { opacity: .35; }
.traffic-table td, .traffic-table th { white-space: nowrap; }
.nav-admin { color: var(--accent) !important; }

/* ---------- Administration : messages et suppression de comptes ---------- */
.admin-search { margin: 0 0 1rem; }
.admin-search .public-link-row { margin-top: .3rem; }
.found { border: 1px solid var(--line); border-radius: 10px; padding: .7rem .9rem; margin: 0 0 .6rem; }
.found p { margin: 0 0 .3rem; }
.msg-list { display: grid; gap: .75rem; }
.msg { border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; background: var(--surface); }
.msg header { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .8rem; }
.msg-toggle { margin-left: auto; }
.msg-text { margin: .5rem 0; }
.msg-done { opacity: .55; }
.acct { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; padding-top: .5rem; border-top: 1px dashed var(--line); }
.acct p { margin: 0; flex: 1 1 260px; }
.admin-kid .charts { margin-top: .5rem; }
.admin-measures { margin-top: 1rem; }
.admin-measures summary { cursor: pointer; font-weight: 600; }

.notify-check { display: flex; gap: .45rem; align-items: flex-start; font-size: .88rem; margin: 0 0 .5rem; }
.notify-check input { margin-top: .2rem; accent-color: var(--brand); }
.acct form { display: flex; flex-direction: column; align-items: flex-start; }

/* ---------- Courbes à imprimer / PDF (avant suppression) ---------- */
.keep-charts { border-left: 4px solid var(--brand, #2f6f62); }
.keep-charts-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.keep-charts-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.print-help .btn { margin-top: 4px; }
.print-child { margin-top: 32px; }
.print-head h2 { margin: 0 0 4px; }
.print-brand { font-size: 13px; color: var(--muted, #5d6973); margin: 0 0 4px; }
.print-chart { margin: 18px 0; }
.charts-print .tabs, .charts-print .zoom, .charts-print .readout, .charts-print .ro-hint,
.charts-print .bmi-ref-select, .charts-print .share { display: none !important; }
.print-table { width: 100%; font-size: 14px; }
@media print {
  @page { size: A4 portrait; margin: 12mm; }
  :root {
    --bg: #ffffff; --surface: #ffffff; --surface-2: #f3f0ea; --ink: #1d2730; --muted: #5d6973; --line: #e4dfd6;
    --brand: #2f6f62; --brand-strong: #24584e; --brand-soft: #e3efeb; --accent: #c8643f;
    --ok: #2e7d4f; --ok-soft: #e4f2e9; --watch: #a86a12; --watch-soft: #fbf0dc; --alert: #b42318; --alert-soft: #fbe6e3;
    --boy: #3f6fa8; --boy-soft: rgba(63,111,168,.12); --boy-soft2: rgba(63,111,168,.07);
    --girl: #a24c75; --girl-soft: rgba(162,76,117,.12); --girl-soft2: rgba(162,76,117,.07);
    --shadow: none; color-scheme: light;
  }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff !important; }
  header.site-header, .site-header, nav, footer, .site-footer, .ad, .ads, .no-print, .cookie-banner, .flash { display: none !important; }
  .print-page { padding: 0 !important; max-width: none !important; }
  .page-break { break-before: page; }
  .print-chart, .print-table tr { break-inside: avoid; }
  .print-table th, .print-table td { padding: 2px 8px !important; font-size: 10pt; }
  .print-chart { margin: 6mm 0; }
  .print-chart .chart-frame, .print-chart .legend { max-width: 128mm; }
  .print-chart h3 { margin-bottom: 2mm; }
  .charts-print .legend { font-size: 11px; }
  .charts-print .bmi-ref p { font-size: 10px; }
  a { color: inherit; text-decoration: none; }
}

.campaign .grid-2 { align-items: start; margin-top: 12px; }
.campaign h4 { margin: 12px 0 6px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.campaign-recent { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
