/* QWERTY Global — landing d'attente. Dark, technique, sobre. Mobile-first. */

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1c222b;
  --border: #2a313c;
  --border-strong: #3a424e;
  --text: #e6edf3;
  --muted: #9aa4b2;
  --muted-2: #6e7783;
  --accent: #79c0ff;          /* bleu technique, liens + focus */
  --accent-strong: #2f81f7;   /* CTA primaire */
  --accent-ink: #06121f;      /* texte sur fond accent */
  --code: #7ee787;            /* symboles de code (vert dev) */
  --danger: #ff7b72;
  --ok: #7ee787;

  --maxw: 1080px;
  --radius: 12px;
  --radius-sm: 8px;
  --section-y: clamp(3rem, 8vw, 6rem);

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent-strong);
  color: var(--accent-ink);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); margin: 0 0 1rem; }
p { margin: 0 0 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 1rem;
}
.brand {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.02em;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent); }

.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.lang-switch a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0.32rem 0.6rem;
  border-radius: 5px;
  line-height: 1;
}
.lang-switch a:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }
.lang-switch a[aria-current="true"] { color: var(--accent-ink); background: var(--accent); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 600;
  line-height: 1;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-strong); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent-strong) 88%, white); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface); border-color: var(--muted-2); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 5vw, 3.2rem);
  padding-top: clamp(2.5rem, 7vw, 4.5rem);
  padding-bottom: var(--section-y);
  border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); margin: 0 0 1.1rem; max-width: 18ch; }
.hero .lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--muted); max-width: 56ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }

/* Carte clavier — placeholder : module français de QWERTY Global */
.hero-map {
  margin: 0;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 3.5vw, 2.4rem);
  box-shadow: 0 18px 44px -30px rgba(0, 0, 0, 0.85);
}
.hero-map img { display: block; width: 100%; height: auto; }
.hero-map figcaption {
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  text-align: center;
}

/* ---------- Sections (un traitement distinct par section) ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--alt { background: var(--surface); }
.section > .container { display: flex; flex-direction: column; }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin: 0 0 0.7rem;
}
.section p { color: var(--muted); font-size: 1.06rem; max-width: 62ch; }

/* 01 — Problème : grande accroche */
.statement { max-width: 760px; }
.statement .lead-big {
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.4;
  font-weight: 500;
  color: var(--muted);
  max-width: none;
  letter-spacing: -0.01em;
}
.statement .lead-big strong { color: var(--text); font-weight: 600; }

/* 02 — L'idée : centré + schéma base/couche */
.idea { align-items: center; text-align: center; max-width: 720px; margin-inline: auto; }
.idea p { max-width: 56ch; }
.layer-viz { width: 100%; max-width: 440px; margin-top: 2.2rem; display: flex; flex-direction: column; gap: 0.55rem; }
.layer-viz .layer {
  height: 2.6rem;
  border-radius: var(--radius-sm);
  position: relative;
}
.layer-viz .layer::after {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-inline: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.layer-viz .base { background: var(--bg); border: 1px solid var(--border-strong); }
.layer-viz .base::after { content: "QWERTY"; color: var(--muted-2); }
.layer-viz .local {
  width: 46%;
  align-self: flex-end;
  background: color-mix(in srgb, var(--accent-strong) 20%, transparent);
  border: 1px solid var(--accent);
}
.layer-viz .local::after { content: "+ \00e9 \00e8 \00e0"; color: var(--accent); justify-content: flex-end; }

/* 03 — Code : panneau type éditeur */
.code-panel {
  width: 100%;
  max-width: 540px;
  margin-bottom: 1.6rem;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.section--alt .code-panel { background: var(--bg); }
.code-panel-bar {
  display: flex;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}
.code-panel-bar span { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: var(--border-strong); }
.code-panel-body { display: flex; flex-wrap: wrap; gap: 0.7rem; padding: 1.4rem; }
.code-panel-body .csym { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 600; color: var(--code); }
code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 0.1em 0.4em;
  color: var(--code);
}

/* 04 — Langues : keycaps */
.lang-cards { list-style: none; padding: 0; margin: 1.8rem 0 0; display: flex; flex-wrap: wrap; gap: 1rem; }
.lang-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.85rem 1.3rem 0.85rem 0.85rem;
}
.lang-card .keycap {
  width: 2.7rem;
  height: 2.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  box-shadow: 0 3px 0 var(--border-strong);
}
.lang-card .lang-name { font-weight: 600; }

/* 05 — Recherche : encart callout */
.callout {
  max-width: 64ch;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.2rem 1.5rem;
}
.callout p { margin: 0; max-width: none; }

/* 06 — Ouvert & gratuit : pastilles de confiance */
.trust { align-items: center; text-align: center; max-width: 680px; margin-inline: auto; }
.trust p { max-width: 54ch; }
.trust-pills {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}
.trust-pills li {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.45rem 1rem;
}

/* ---------- Waitlist ---------- */
.waitlist {
  margin-block: var(--section-y);
  padding: clamp(1.6rem, 4vw, 2.8rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent-strong);
  border-radius: var(--radius);
  display: grid;
  gap: clamp(1.6rem, 4vw, 3rem);
}
@media (min-width: 820px) {
  .waitlist { grid-template-columns: 0.82fr 1fr; align-items: start; }
}
.waitlist-intro h2 { margin: 0 0 0.7rem; }
.waitlist-intro p { color: var(--muted); margin: 0; max-width: 36ch; }

.wl-form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field label, .field legend { font-size: 0.92rem; font-weight: 600; color: var(--text); }
.field .req { color: var(--accent); }
.field .hint { font-size: 0.82rem; color: var(--muted-2); font-weight: 400; }

input[type="email"], input[type="text"], select {
  font: inherit;
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease;
}
input::placeholder { color: var(--muted-2); }
input:hover, select:hover { border-color: var(--muted-2); }
select {
  appearance: none;
  cursor: pointer;
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%239aa4b2' stroke-width='1.6'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 12px 8px;
}
input:focus-visible, select:focus-visible { border-color: var(--accent); outline-offset: 0; }

.field-row { display: grid; gap: 1.1rem; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }

.checkbox-field {
  grid-auto-flow: column;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.6rem;
}
.checkbox-field input { margin-top: 0.25rem; width: 1.1rem; height: 1.1rem; accent-color: var(--accent-strong); }
.checkbox-field label { font-weight: 400; color: var(--muted); }

.wl-form .btn { width: 100%; margin-top: 0.3rem; }

.form-status { margin: 0.4rem 0 0; font-size: 0.95rem; min-height: 1.2em; }
.form-status.is-error { color: var(--danger); }
.form-status.is-success { color: var(--ok); }
.form-status.is-loading { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2.2rem;
}
.site-footer p { color: var(--muted-2); font-size: 0.9rem; margin: 0; max-width: 70ch; }
.site-footer a { color: var(--muted); }

[hidden] { display: none !important; }
