/* Feuille de style des guides — autonome et minuscule par nécessité : ces
   pages sont servies en HTML pur, sans bundle ni JavaScript, pour rester
   lisibles par un robot au premier passage.

   Les valeurs viennent de src/styles/palette.js (thème sombre). Elles sont
   recopiées ici plutôt qu'importées, faute de build sur ces pages : toute
   retouche de la palette doit donc être répercutée à la main. */

:root {
  color-scheme: dark;

  --surface-950: #05060b;
  --surface-900: #0a0c14;
  --surface-850: #0f1220;
  --surface-800: #151929;

  --ink-50: #f7f8fb;
  --ink-100: #e7eaf3;
  --ink-300: #a9b1c6;
  --ink-500: #79819b;
  --ink-700: #73798f;

  --brand-300: #b3b8ff;
  --brand-400: #8b93ff;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --profit-400: #34d399;

  --line: 255 255 255;
  --shadow-card: 0 1px 2px rgb(0 0 0 / 0.4), 0 6px 20px -10px rgb(0 0 0 / 0.55);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--surface-950);
  color: var(--ink-100);
  font-family:
    'Inter Variable',
    Inter,
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Les deux voiles indigo/émeraude de l'app, en CSS pur : c'est ce qui fait
   qu'une page de guide « appartient » visuellement au produit. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 12% -10%, rgb(99 102 241 / 0.16), transparent 60%),
    radial-gradient(50rem 34rem at 100% 0%, rgb(16 185 129 / 0.09), transparent 55%);
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
}

/* ---------- Chrome ---------- */

header.site {
  border-bottom: 1px solid rgb(var(--line) / 0.06);
}

header.site .wrap,
footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink-50);
  font-weight: 650;
  font-size: 1.02rem;
  letter-spacing: -0.015em;
  text-decoration: none;
}

.brand svg {
  width: 1.6rem;
  height: 1.6rem;
  padding: 0.32rem;
  border-radius: 0.55rem;
  background: rgb(99 102 241 / 0.15);
  color: var(--brand-400);
}

footer.site {
  border-top: 1px solid rgb(var(--line) / 0.06);
  margin-top: 4rem;
}

footer.site .wrap {
  font-size: 0.85rem;
  color: var(--ink-700);
}

/* ---------- Texte ---------- */

h1 {
  font-size: clamp(2rem, 5.2vw, 2.75rem);
  line-height: 1.14;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--ink-50);
  margin: 1.75rem 0 0.85rem;
  text-wrap: balance;
}

h2 {
  font-size: 1.4rem;
  line-height: 1.28;
  letter-spacing: -0.015em;
  font-weight: 650;
  color: var(--ink-50);
  margin: 3rem 0 0.85rem;
  text-wrap: balance;
}

h3 {
  font-size: 1.1rem;
  font-weight: 620;
  color: var(--ink-50);
  margin: 2.1rem 0 0.5rem;
}

p,
li {
  color: var(--ink-300);
}

.lead {
  font-size: 1.14rem;
  line-height: 1.65;
  color: var(--ink-100);
  text-wrap: pretty;
}

.meta {
  color: var(--ink-700);
  font-size: 0.82rem;
  margin: 0;
}

strong {
  color: var(--ink-50);
  font-weight: 620;
}

a {
  color: var(--brand-300);
  text-decoration-color: rgb(139 147 255 / 0.4);
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-400);
}

ul,
ol {
  padding-left: 1.2rem;
}

li {
  margin-bottom: 0.45rem;
}

li::marker {
  color: var(--ink-700);
}

/* ---------- Blocs ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}

th,
td {
  border-bottom: 1px solid rgb(var(--line) / 0.06);
  padding: 0.65rem 0.55rem;
  text-align: left;
  color: var(--ink-300);
  white-space: nowrap;
}

th {
  color: var(--ink-50);
  font-weight: 600;
  font-size: 0.88rem;
}

td:first-child,
th:first-child {
  white-space: normal;
}

/* Le panneau de l'app : surface mate, hairline, ombre discrète. */
.note {
  background: var(--surface-900);
  border-radius: 1rem;
  box-shadow:
    var(--shadow-card),
    inset 0 0 0 1px rgb(var(--line) / 0.05);
  border-left: 2px solid var(--brand-500);
  padding: 1.1rem 1.25rem;
  margin: 1.9rem 0;
}

.note p {
  margin: 0;
}

.note p + p {
  margin-top: 0.7rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brand-600);
  color: #fff;
  text-decoration: none;
  font-weight: 620;
  font-size: 0.95rem;
  padding: 0.72rem 1.35rem;
  border-radius: 0.85rem;
  box-shadow: var(--shadow-card);
  margin-top: 0.6rem;
  transition: background 0.15s ease;
}

.cta:hover {
  background: var(--brand-500);
  color: #fff;
}

.card {
  display: block;
  background: var(--surface-900);
  border-radius: 1rem;
  box-shadow:
    var(--shadow-card),
    inset 0 0 0 1px rgb(var(--line) / 0.05);
  padding: 1.25rem 1.4rem;
  margin-bottom: 0.85rem;
  text-decoration: none;
  transition:
    transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgb(0 0 0 / 0.4),
    0 12px 28px -12px rgb(0 0 0 / 0.55),
    inset 0 0 0 1px rgb(var(--line) / 0.09);
}

.card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.08rem;
}

.card p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.6;
}

.cards-grid {
  margin-top: 1.75rem;
}

.next {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(var(--line) / 0.06);
  font-size: 0.95rem;
}

:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 2px;
  border-radius: 0.35rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }

  .card:hover {
    transform: none;
  }
}
