/* Hygie, site de presentation. Identite reprise des tokens de l'app
   (repos/hygie/design/tokens) : papier clair / marine sombre, accent
   turquoise, IBM Plex Sans + Mono auto-hebergees. Le theme est pilote
   par [data-theme] sur <html>, pose avant le premier paint. */

/* ---------- Fontes (auto-hebergees, SIL OFL 1.1) ---------- */
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(assets/fonts/IBMPlexSans-400-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(assets/fonts/IBMPlexSans-400-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(assets/fonts/IBMPlexSans-600-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(assets/fonts/IBMPlexSans-600-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(assets/fonts/IBMPlexSans-700-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(assets/fonts/IBMPlexSans-700-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(assets/fonts/IBMPlexMono-400-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(assets/fonts/IBMPlexMono-400-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(assets/fonts/IBMPlexMono-500-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(assets/fonts/IBMPlexMono-500-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- Tokens (repris de l'app Hygie) ---------- */
:root {
  --bg: oklch(0.972 0.003 80);
  --surface: oklch(0.995 0.002 80);
  --surface-2: oklch(0.952 0.004 80);
  --border: oklch(0.905 0.006 80);
  --border-strong: oklch(0.835 0.008 80);
  --text-1: oklch(0.235 0.012 260);
  --text-2: oklch(0.470 0.012 260);
  --text-3: oklch(0.615 0.010 260);
  --accent: oklch(0.550 0.100 178);
  --accent-strong: oklch(0.470 0.100 178);
  --accent-soft: oklch(0.550 0.100 178 / 0.12);
  --on-accent: oklch(0.99 0.003 178);
  --ok: oklch(0.580 0.120 150);
  --ok-soft: oklch(0.580 0.120 150 / 0.13);
  --data-heart: oklch(0.580 0.140 22);
  --data-activity: oklch(0.580 0.120 150);
  --data-sleep: oklch(0.560 0.120 290);
  --chart-grid: oklch(0.905 0.006 80);
  --font-ui: 'IBM Plex Sans', -apple-system, 'Helvetica Neue', sans-serif;
  --font-data: 'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;
  --r-md: 6px;
  --r-lg: 10px;
  --shadow-2: 0 6px 24px oklch(0 0 0 / 0.12);
}
[data-theme="dark"] {
  --bg: oklch(0.165 0.012 255);
  --surface: oklch(0.205 0.012 255);
  --surface-2: oklch(0.242 0.013 255);
  --border: oklch(0.292 0.014 255);
  --border-strong: oklch(0.372 0.015 255);
  --text-1: oklch(0.930 0.006 255);
  --text-2: oklch(0.712 0.010 255);
  --text-3: oklch(0.548 0.012 255);
  --accent: oklch(0.720 0.110 178);
  --accent-strong: oklch(0.790 0.110 178);
  --accent-soft: oklch(0.720 0.110 178 / 0.16);
  --on-accent: oklch(0.16 0.02 178);
  --ok: oklch(0.720 0.130 150);
  --ok-soft: oklch(0.720 0.130 150 / 0.15);
  --data-heart: oklch(0.700 0.150 22);
  --data-activity: oklch(0.720 0.130 150);
  --data-sleep: oklch(0.680 0.120 290);
  --chart-grid: oklch(0.262 0.013 255);
  --shadow-2: 0 6px 24px oklch(0 0 0 / 0.4);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text-1);
  font: 400 16px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
}
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; }
p { color: var(--text-2); }
.hy-label {
  font: 500 12px/1.2 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ---------- Header ---------- */
.site-header {
  max-width: 1060px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font: 600 19px/1 var(--font-ui); color: var(--text-1); letter-spacing: -0.01em; }
.mark-bg { fill: #0f1417; }
[data-theme="dark"] .mark-bg { fill: oklch(0.242 0.013 255); }
.mark-bars { fill: #5ec8bd; }
.controls { display: flex; align-items: center; gap: 12px; }
.theme-btn {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--text-2);
  border: 1px solid var(--border); border-radius: var(--r-md);
  cursor: pointer;
}
.theme-btn:hover { color: var(--text-1); border-color: var(--border-strong); }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
.divider { width: 1px; height: 20px; background: var(--border); }
.seg-group { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.seg {
  padding: 7px 11px;
  font: 500 12px/1 var(--font-data);
  background: var(--surface); color: var(--text-3);
  border: none; cursor: pointer;
}
.seg + .seg { border-left: 1px solid var(--border); }
.seg.is-on { background: var(--accent-soft); color: var(--accent-strong); }

/* ---------- Layout ---------- */
.main { max-width: 1060px; margin: 0 auto; padding: 0 24px 40px; }
.section { margin-top: 88px; }
.section-title { font-size: 30px; font-weight: 700; margin-bottom: 26px; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding-top: 46px; }
.eyebrow {
  display: inline-block;
  font: 500 12px/1 var(--font-data);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
}
.headline {
  font-size: clamp(34px, 5.4vw, 54px);
  font-weight: 700;
  margin: 22px auto 0;
  max-width: 17ch;
}
.sub { max-width: 62ch; margin: 18px auto 0; font-size: 18px; }
.cta {
  margin-top: 26px;
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border-radius: var(--r-md);
  font: 600 14px/1 var(--font-ui);
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: var(--surface); color: var(--text-1); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }
.host-link { margin-top: 20px; }
.host-link .btn { font-family: var(--font-data); font-weight: 500; font-size: 13px; }
.ios-cta { margin-top: 18px; }
.ios-cta .btn { font-family: var(--font-data); font-weight: 500; font-size: 13px; }
.footer-links { display: inline-flex; gap: 16px; }
.hero-note {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 18px;
  font: 400 13px/1.4 var(--font-ui);
  color: var(--text-3);
}
.mock-note {
  margin-top: 12px;
  font: 400 12px/1.4 var(--font-ui);
  color: var(--text-3);
  text-align: center;
}

/* ---------- Maquette d'app ---------- */
.app-window {
  margin: 40px auto 0;
  display: flex;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.aw-sidebar {
  flex: 0 0 168px;
  padding: 18px 14px;
  border-right: 1px solid var(--border);
  background: var(--bg);
  display: flex; flex-direction: column; gap: 4px;
}
.aw-mark { margin-bottom: 14px; }
.aw-nav {
  font: 500 12.5px/1 var(--font-ui);
  color: var(--text-3);
  padding: 8px 10px;
  border-radius: var(--r-md);
  white-space: nowrap;
}
.aw-nav.is-on { background: var(--accent-soft); color: var(--accent-strong); }
.aw-main { flex: 1 1 auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.aw-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.aw-label {
  font: 500 10.5px/1.2 var(--font-ui);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
}
.aw-pills { display: inline-flex; gap: 4px; }
.aw-pill {
  font: 500 10.5px/1 var(--font-data);
  color: var(--text-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 9px;
  white-space: nowrap;
}
.aw-pill.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.aw-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.aw-tile {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 5px;
  background: var(--surface);
}
.aw-value {
  font: 500 21px/1.1 var(--font-data);
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  color: var(--text-1);
}
.aw-value small { font-size: 12px; color: var(--text-3); font-weight: 400; }
.aw-trend { font: 500 11px/1 var(--font-data); }
.aw-trend.is-good { color: var(--ok); background: var(--ok-soft); border-radius: 999px; padding: 3px 7px; align-self: flex-start; }
.aw-trend.is-neutral { color: var(--text-3); background: var(--surface-2); border-radius: 999px; padding: 3px 7px; align-self: flex-start; }
.aw-chart-card {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 14px 10px;
  background: var(--surface);
  display: flex; flex-direction: column; gap: 10px;
  min-width: 0;
}
.aw-chart { width: 100%; height: 130px; display: block; }
.aw-grid line { stroke: var(--chart-grid); stroke-width: 1; }
.aw-line { fill: none; stroke: var(--data-heart); stroke-width: 2; stroke-linejoin: round; }
.aw-area { fill: var(--data-heart); opacity: 0.08; }
.aw-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.aw-bars { width: 100%; height: 70px; display: block; }
.aw-bars rect { fill: var(--data-activity); opacity: 0.75; }
.aw-sleep { width: 100%; height: 70px; display: block; }
.aw-sleep rect { fill: var(--data-sleep); opacity: 0.75; }
.aw-sleep .aw-sleep-deep rect { opacity: 0.4; }

/* ---------- Cartes ---------- */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
}
.card h3 { font-size: 16.5px; font-weight: 600; margin-bottom: 8px; }
.card p { font-size: 14.5px; }
.card-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-bottom: 14px;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 26px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 6px;
}
.stat-value {
  font: 500 30px/1.05 var(--font-data);
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  color: var(--accent-strong);
}
.stat-label {
  font: 500 12px/1.3 var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.tech-list { list-style: none; display: grid; gap: 10px; }
.tech-list li {
  position: relative;
  padding-left: 26px;
  font-size: 15px;
  color: var(--text-2);
}
.tech-list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 9px;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- iOS ---------- */
.ios-inner {
  display: flex; align-items: center; gap: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 40px;
}
.ios-text { flex: 1 1 auto; }
.ios-text .section-title { margin-bottom: 12px; }
.ios-phone { flex: 0 0 auto; }
.phone {
  width: 168px; height: 220px;
  border: 1px solid var(--border-strong);
  border-radius: 26px;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  box-shadow: var(--shadow-2);
}
.phone-status { font: 600 14px/1 var(--font-ui); color: var(--text-1); margin-top: 8px; }
.phone-sub { font: 400 11.5px/1 var(--font-data); color: var(--text-3); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 88px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13.5px;
  color: var(--text-3);
}
.footer-link { color: var(--text-2); text-decoration: none; }
.footer-link:hover { color: var(--accent-strong); }

/* ---------- Pages legales (privacy.html) ---------- */
/* Les deux langues sont dans le HTML ; la visible suit <html lang>, que app.js
   pose depuis le selecteur FR/EN du header ou le parametre ?lang=. */
html[lang="fr"] [data-lang="en"], html[lang="en"] [data-lang="fr"] { display: none; }
.legal { max-width: 720px; margin: 0 auto; padding-top: 46px; }
.legal-title { font-size: clamp(30px, 4.6vw, 42px); font-weight: 700; }
.legal-meta { margin-top: 12px; font: 400 13px/1.5 var(--font-data); color: var(--text-3); }
.legal h2 { font-size: 20px; font-weight: 600; margin: 40px 0 12px; }
.legal p, .legal li { font-size: 15.5px; color: var(--text-2); }
.legal p + p { margin-top: 12px; }
.legal ul { margin: 12px 0; padding-left: 22px; display: grid; gap: 6px; }
.legal a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.legal-summary { margin-top: 30px; }
.legal-summary h2 { margin: 0 0 8px; font-size: 16.5px; }
.legal-summary p { color: var(--text-1); }

/* ---------- 404 ---------- */
.nf { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 24px; }
.nf-code { font: 500 54px/1 var(--font-data); color: var(--accent-strong); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .aw-sidebar { display: none; }
  .aw-tiles { grid-template-columns: 1fr; }
  .aw-row { grid-template-columns: 1fr; }
  .aw-topbar { flex-direction: column; align-items: flex-start; }
  .ios-inner { flex-direction: column; text-align: center; padding: 28px 22px; }
  .ios-text .hy-label { text-align: center; }
  .section { margin-top: 64px; }
  .sub { font-size: 16px; }
}

/* ---------- Captures ---------- */
.shots { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.shots figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.shots .wide { grid-column: 1 / -1; }
.shots img { display: block; width: 100%; height: auto; }
.shots figcaption { padding: 10px 14px 12px; font-size: 13px; line-height: 1.45; color: var(--text-3); }
