/* Palette et typographie reprises des jetons de l'application
   (apps/mobile/src/theme/tokens.ts), pour que le site ait la voix du produit. */

:root {
  --ground: #fbfbfa;
  --surface: #ffffff;
  --surface-sunk: #f2f2ef;
  --border: #e3e3de;
  --border-strong: #cfcfc7;
  --ink: #16150f;
  --muted: #6b6a62;
  --accent: #1f5c4a;
  --accent-ink: #ffffff;
  --accent-wash: #e7f0ec;

  --sans: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --measure: 40rem;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #111110;
    --surface: #1a1a18;
    --surface-sunk: #232320;
    --border: #32322e;
    --border-strong: #46463f;
    --ink: #f4f3ee;
    --muted: #a3a29a;
    --accent: #7fd1b3;
    --accent-ink: #0e2a22;
    --accent-wash: #1b2b26;
  }
}

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

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

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

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding-inline: 20px;
  padding-block: 0 4rem;
}

/* ---------- en-tête de site ---------- */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-block: 1.75rem 0;
}

.wordmark {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
}

.masthead nav {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.masthead nav a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.masthead nav a:hover,
.masthead nav a:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--border-strong);
}

/* ---------- titres ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.9rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin: 0 0 1.1rem;
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 2.75rem 0 0.9rem;
}

h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 1.75rem 0 0.6rem;
}

.lede {
  font-size: 1.12rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.lede strong {
  color: var(--ink);
  font-weight: 600;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
}

strong {
  font-weight: 600;
}

/* ---------- l'exemple avant / après ---------- */

.rename {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin: 1.75rem 0 0;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.5;
}

.rename__row + .rename__row {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border);
}

.rename__label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.rename__before {
  color: var(--muted);
}

.rename__after {
  color: var(--ink);
  font-weight: 500;
  word-break: break-word;
}

/* ---------- étapes ---------- */

ol.how {
  counter-reset: how;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

ol.how li {
  counter-increment: how;
  position: relative;
  padding-left: 2.4rem;
  margin-bottom: 0.7rem;
}

ol.how li::before {
  content: counter(how);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.65rem;
  height: 1.65rem;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
}

ul {
  padding-left: 1.15rem;
  margin: 0 0 1rem;
}

li {
  margin-bottom: 0.4rem;
}

/* ---------- encadré ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.15rem 1.3rem;
  margin: 1.25rem 0;
}

.card > :first-child {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.callout {
  background: var(--accent-wash);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
  font-size: 0.97rem;
}

.callout > :last-child {
  margin-bottom: 0;
}

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--surface-sunk);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.08em 0.36em;
  word-break: break-word;
}

/* ---------- tableaux ---------- */

.scroller {
  overflow-x: auto;
  margin: 0 0 1.25rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 34rem;
}

th,
td {
  text-align: left;
  padding: 0.6rem 0.9rem 0.6rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- pied de page ---------- */

footer {
  margin-top: 3.5rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.8;
  color: var(--muted);
}

footer a {
  color: var(--muted);
}

footer a:hover {
  color: var(--ink);
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
}
