@import url("/assets/fonts/fonts.css");
:root {
  --ground: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eceef2;
  --ink: #13151b;
  --ink-2: #4d5363;
  --ink-3: #7b8190;
  --line: #dde0e6;
  --accent: #f2683c;
  --accent-ink: #c6461d;
  --accent-soft: #fde6dc;
  --add: #1f8a4c;
  --add-bg: #e3f5ea;
  --del: #c43b2f;
  --del-bg: #fbe5e2;
  --warn: #b7791f;
  --phone-frame: #1b1d23;
  --todo-bg: #fff4c2;
  --todo-ink: #6b5200;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Hanken Grotesk", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #0f1116;
    --surface: #171a21;
    --surface-2: #20242d;
    --ink: #eceef3;
    --ink-2: #b3b8c4;
    --ink-3: #8a909d;
    --line: #2a2f3a;
    --accent: #ff7a4d;
    --accent-ink: #ff9a76;
    --accent-soft: #3a2119;
    --add: #4cc47f;
    --add-bg: #12301f;
    --del: #ff7b6e;
    --del-bg: #3a1714;
    --warn: #e0a84a;
    --phone-frame: #000000;
    --todo-bg: #3d3410;
    --todo-ink: #f3dc85;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0f1116;
  --surface: #171a21;
  --surface-2: #20242d;
  --ink: #eceef3;
  --ink-2: #b3b8c4;
  --ink-3: #8a909d;
  --line: #2a2f3a;
  --accent: #ff7a4d;
  --accent-ink: #ff9a76;
  --accent-soft: #3a2119;
  --add: #4cc47f;
  --add-bg: #12301f;
  --del: #ff7b6e;
  --del-bg: #3a1714;
  --warn: #e0a84a;
  --phone-frame: #000000;
  --todo-bg: #3d3410;
  --todo-ink: #f3dc85;
}

* { box-sizing: border-box; }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  padding-inline: 20px;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1120px; margin-inline: auto; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; }
p { margin: 0; }
.mono { font-family: var(--mono); }
.todo { background: var(--todo-bg); color: var(--todo-ink); border-radius: 4px; padding: 0 5px; font-size: 0.92em; }

/* En-tête */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  margin-inline: -20px; padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav { display: flex; gap: 18px; margin-left: auto; flex-wrap: wrap; font-size: 15px; }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

/* Sélecteur de langue */
.langs { display: flex; gap: 2px; font-family: var(--mono); font-size: 12.5px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.langs a, .langs span { padding: 3px 9px; border-radius: 999px; text-decoration: none; color: var(--ink-2); }
.langs a:hover { color: var(--ink); }
.langs span { background: var(--surface-2); color: var(--ink); font-weight: 500; }

/* Héros */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding-block: 72px 56px; }
.eyebrow { font-family: var(--mono); font-size: 13px; color: var(--ink-3); letter-spacing: 0.02em; }
.eyebrow b { color: var(--accent-ink); font-weight: 500; }
.hero h1 { font-size: clamp(42px, 6.4vw, 78px); line-height: 0.98; letter-spacing: -0.035em; font-weight: 800; margin-top: 18px; }
.hero h1 span { color: var(--accent); }
.hero .lede { font-size: 20px; color: var(--ink-2); max-width: 34em; margin-top: 22px; }
.cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 30px; }
.store {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  background: var(--ink); color: var(--ground); border-radius: 12px; padding: 10px 18px 10px 14px;
}
.store svg { width: 24px; height: 24px; fill: currentColor; }
.store small { display: block; font-size: 11px; opacity: 0.8; line-height: 1.1; }
.store strong { display: block; font-size: 18px; line-height: 1.15; font-weight: 600; }
.cta .note { font-size: 14px; color: var(--ink-3); }
.facts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.chip { font-family: var(--mono); font-size: 12.5px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 4px 11px; }

/* Téléphone */
.phone {
  width: min(280px, 78vw); aspect-ratio: 9 / 19.2; max-width: 100%;
  background: var(--phone-frame); border-radius: 46px; padding: 10px;
  box-shadow: 0 30px 60px -28px rgba(20, 22, 30, 0.45);
  flex: none;
}
.screen {
  height: 100%; border-radius: 37px; overflow: hidden; position: relative;
  background: var(--ground); color: var(--ink); font-size: 11.5px; line-height: 1.35;
  display: flex; flex-direction: column;
}
.status { display: flex; justify-content: space-between; padding: 12px 22px 4px; font-weight: 600; font-size: 11px; }
.island { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 76px; height: 22px; background: #000; border-radius: 12px; }
.navbar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; }
.navbar .back { width: 24px; height: 24px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--ink); font-size: 13px; flex: none; }
.navbar .t { font-weight: 700; font-size: 12.5px; flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.body { flex: 1; overflow: hidden; padding: 4px 12px 0; display: flex; flex-direction: column; gap: 8px; }
.panel { background: var(--surface); border-radius: 12px; padding: 9px 10px; }
.row { display: flex; align-items: center; gap: 7px; }
.muted { color: var(--ink-3); }
.small { font-size: 10px; }
.badge { font-size: 9.5px; font-weight: 600; border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.b-open { background: var(--add-bg); color: var(--add); }
.b-fail { background: var(--del-bg); color: var(--del); }
.b-draft { background: var(--surface-2); color: var(--ink-2); }
.b-accent { background: var(--accent-soft); color: var(--accent-ink); }
.seg { display: flex; background: var(--surface-2); border-radius: 9px; padding: 2px; }
.seg span { flex: 1; text-align: center; padding: 4px 0; border-radius: 7px; font-size: 10.5px; color: var(--ink-2); }
.seg span.on { background: var(--surface); color: var(--ink); font-weight: 600; }
.diff { font-family: var(--mono); font-size: 9.6px; border-radius: 10px; overflow: hidden; background: var(--surface); }
.diff div { padding: 1.5px 8px; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.diff .h { background: var(--surface-2); color: var(--ink-3); }
.diff .a { background: var(--add-bg); color: var(--add); }
.diff .d { background: var(--del-bg); color: var(--del); }
.thread { border-left: 2px solid var(--accent); padding-left: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.ok { background: var(--add); } .ko { background: var(--del); } .run { background: var(--warn); } .man { background: var(--ink-3); }
.job { display: flex; align-items: center; gap: 7px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.job:last-child { border-bottom: 0; }
.job .n { flex: 1; }
.log { font-family: var(--mono); font-size: 9.2px; background: #12141a; color: #c9cfdb; border-radius: 10px; padding: 8px 9px; line-height: 1.5; }
.log .g { color: #5fd38d; } .log .r { color: #ff7b6e; } .log .y { color: #e5c06a; } .log .c { color: #7fb4ff; }
.choice { display: flex; gap: 6px; }
.choice span { flex: 1; text-align: center; border-radius: 8px; padding: 5px 0; font-size: 10px; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.choice span.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.banner { background: var(--accent); color: #fff; border-radius: 12px; padding: 8px 11px; display: flex; justify-content: space-between; font-weight: 600; font-size: 10.5px; }
.tabbar { display: flex; gap: 6px; padding: 8px 12px 16px; align-items: center; }
.tabbar .tabs { flex: 1; display: flex; justify-content: space-around; background: var(--surface); border-radius: 999px; padding: 6px 4px; font-size: 9px; color: var(--ink-2); }
.tabbar .tabs span { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.tabbar .tabs span.on { color: var(--accent); font-weight: 600; }
.tabbar .tabs i { font-style: normal; font-size: 13px; line-height: 1; }
.tabbar .search { width: 34px; height: 34px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 13px; }

/* Captures réelles dans un cadre d'iPhone */
.phone.real { aspect-ratio: auto; height: auto; padding: 9px; border-radius: 48px; }
.phone.real img { display: block; width: 100%; height: auto; border-radius: 39px; }
.phone .dark-shot { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .phone .light-shot { display: none; }
  :root:not([data-theme="light"]) .phone .dark-shot { display: block; }
}
:root[data-theme="dark"] .phone .light-shot { display: none; }
:root[data-theme="dark"] .phone .dark-shot { display: block; }

/* Sections */
section.block { padding-block: 72px; border-top: 1px solid var(--line); }
.kicker { font-family: var(--mono); font-size: 13px; color: var(--accent-ink); }
.block h2 { font-size: clamp(30px, 4vw, 46px); line-height: 1.05; letter-spacing: -0.025em; font-weight: 800; margin-top: 10px; max-width: 18em; }
.block .intro { color: var(--ink-2); max-width: 40em; margin-top: 16px; font-size: 18px; }

/* Journal de fonctionnalités */
.log-list { margin-top: 40px; border-top: 1px solid var(--line); }
.commit { display: grid; grid-template-columns: 26px 92px 1fr auto; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); align-items: start; }
.commit .rail { position: relative; height: 100%; min-height: 40px; }
.commit .rail::before { content: ""; position: absolute; left: 12px; top: -21px; bottom: -21px; width: 2px; background: var(--line); }
.commit:first-child .rail::before { top: 12px; }
.commit:last-child .rail::before { bottom: auto; height: 33px; }
.commit .rail::after { content: ""; position: absolute; left: 6px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--ground); border: 3px solid var(--accent); }
.commit .sha { font-family: var(--mono); font-size: 14px; color: var(--ink-3); padding-top: 2px; }
.commit h3 { font-family: var(--body); font-weight: 600; font-size: 19px; letter-spacing: -0.005em; }
.commit p { color: var(--ink-2); margin-top: 4px; max-width: 46em; }
.commit .scope { font-family: var(--mono); font-size: 12px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; white-space: nowrap; margin-top: 2px; }

/* Galerie */
.gallery { display: flex; gap: 36px; flex-wrap: wrap; justify-content: center; margin-top: 44px; }
.shot { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 280px; }
.shot figcaption { text-align: center; color: var(--ink-2); font-size: 15px; }
.shot figcaption b { color: var(--ink); display: block; font-weight: 600; }
figure { margin: 0; }

/* Compatibilité */
.compat { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; margin-top: 36px; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: 15px; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 600; }
td.v { font-family: var(--mono); }
.pass { color: var(--add); font-weight: 600; }
.pend { color: var(--warn); font-weight: 600; }
.points { display: grid; gap: 18px; }
.points h3 { font-family: var(--body); font-size: 17px; font-weight: 600; }
.points p { color: var(--ink-2); margin-top: 3px; }

/* Confidentialité (résumé) */
.privacy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 40px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); }
.privacy-grid > div { padding: 26px 24px; border-right: 1px solid var(--line); }
.privacy-grid > div:last-child { border-right: 0; }
.privacy-grid .big { font-family: var(--display); font-weight: 800; font-size: 34px; letter-spacing: -0.02em; color: var(--accent); }
.privacy-grid h3 { font-family: var(--body); font-size: 17px; font-weight: 600; margin-top: 6px; }
.privacy-grid p { color: var(--ink-2); font-size: 15.5px; margin-top: 6px; }
.more { margin-top: 22px; }

/* Pages de texte */
.page { padding-block: 64px 80px; }
.page .doc { max-width: 720px; }
.page h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.03em; font-weight: 800; line-height: 1.02; }
.page .meta { color: var(--ink-3); font-size: 15px; margin-top: 12px; }
.page h2 { font-size: 24px; letter-spacing: -0.015em; margin-top: 44px; }
.page p, .page li { color: var(--ink-2); margin-top: 12px; }
.page ul { padding-left: 20px; margin: 0; }
.page strong { color: var(--ink); }
.tldr { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; margin-top: 32px; }
.tldr p:first-child { margin-top: 0; }
.datatable { margin-top: 16px; }
.datatable td:first-child { color: var(--ink); font-weight: 500; }
.datatable td { color: var(--ink-2); vertical-align: top; }

/* Support */
.contact { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-top: 28px; }
.contact .addr { font-family: var(--mono); font-size: 17px; color: var(--ink); user-select: all; }
.btn { font: inherit; font-size: 14px; font-weight: 600; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); border-radius: 10px; padding: 7px 14px; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.contact .hint { color: var(--ink-3); font-size: 14px; flex-basis: 100%; }
details { border-bottom: 1px solid var(--line); padding-block: 4px; }
details:first-of-type { border-top: 1px solid var(--line); margin-top: 28px; }
summary { cursor: pointer; padding: 16px 0; font-weight: 600; font-size: 18px; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--accent); font-weight: 500; }
details[open] summary::after { content: "−"; }
details > div { padding-bottom: 18px; }
details > div p:first-child { margin-top: 0; }
kbd, code { font-family: var(--mono); font-size: 0.88em; background: var(--surface-2); border-radius: 5px; padding: 1px 6px; color: var(--ink); }

/* Pied de page */
footer { border-top: 1px solid var(--line); padding-block: 36px 48px; color: var(--ink-3); font-size: 14px; }
footer .wrap { display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--ink-2); text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .legal { flex-basis: 100%; max-width: 60em; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-block: 48px 40px; gap: 40px; }
  .hero .phone-slot { justify-self: center; }
  .compat { grid-template-columns: 1fr; }
  .privacy-grid { grid-template-columns: 1fr; }
  .privacy-grid > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .privacy-grid > div:last-child { border-bottom: 0; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .nav { margin-left: 0; gap: 14px; width: 100%; }
  .commit { grid-template-columns: 22px 1fr; gap: 6px 14px; }
  .commit .sha { grid-column: 2; padding-top: 0; }
  .commit > div:nth-child(3) { grid-column: 2; }
  .commit .scope { grid-column: 2; justify-self: start; }
  .commit .rail { grid-row: 1 / span 3; }
  section.block { padding-block: 52px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero .phone { animation: rise 0.7s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes rise { from { transform: translateY(18px); } to { transform: none; } }
}

/* Formulaire de contact */
.contact-form { display: grid; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; margin-top: 32px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 15px; color: var(--ink); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--ground);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
}
.field textarea { resize: vertical; min-height: 9em; line-height: 1.5; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: var(--del); }
.page .contact-form .hint { color: var(--ink-3); font-size: 14px; margin-top: 0; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.page .form-status { margin-top: 0; font-weight: 500; }
.form-status:empty { display: none; }
.form-status[data-kind="ok"] { color: var(--add); }
.form-status[data-kind="error"] { color: var(--del); }
.form-actions { display: flex; gap: 14px 18px; align-items: center; flex-wrap: wrap; }
.form-actions .hint { flex: 1 1 18em; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-size: 15px; padding: 10px 18px; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-primary:disabled { opacity: 0.6; cursor: progress; }
.page .alt-contact { color: var(--ink-3); font-size: 15px; margin-top: 18px; }
@media (max-width: 620px) {
  .contact-form { padding: 18px; }
}
