/*
 * TrustMe — site public.
 * Une seule feuille de style, sans dépendance, sans police externe.
 * Les couleurs sont des jetons : un futur redesign ne touche que :root.
 */

:root {
  color-scheme: light;

  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #17191c;
  --muted: #545a62;
  --accent: #334a60;
  --accent-strong: #1f3043;
  --rule: #e2e2dd;
  --note-bg: #eef1f4;
  --note-rule: #8a9bad;
  --warn-bg: #fbf6ec;
  --warn-rule: #b08a3e;
  --focus: #2f5f8f;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "Liberation Sans", sans-serif;
  --radius: 10px;
  --page: 64rem;
  --measure: 42rem;
  --gutter: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --bg: #131517;
    --surface: #1b1e21;
    --text: #eceef0;
    --muted: #a3a9b0;
    --accent: #a9bfd4;
    --accent-strong: #c9d8e6;
    --rule: #2c3035;
    --note-bg: #1c2329;
    --note-rule: #5d7389;
    --warn-bg: #241f16;
    --warn-rule: #a3823f;
    --focus: #8fb4d9;
  }
}

/* --- Base ---------------------------------------------------------------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3 {
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.875rem, 1.35rem + 2.4vw, 2.625rem);
  letter-spacing: -0.025em;
}

h2 {
  margin: 3rem 0 0.75rem;
  font-size: 1.375rem;
}

h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.0625rem;
  letter-spacing: 0;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

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

li + li {
  margin-top: 0.375rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-strong);
  text-decoration-thickness: 2px;
}

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

strong {
  font-weight: 650;
}

.wrap {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -3rem;
  z-index: 10;
  padding: 0.5rem 0.875rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: 6px;
}

.skip-link:focus {
  top: 0.75rem;
}

/* --- En-tête et pied de page -------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

.site-nav ul,
.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li + li,
.footer-nav li + li {
  margin-top: 0;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
}

.footer-inner {
  display: grid;
  gap: 0.75rem;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

.footer-inner p {
  margin: 0;
}

.footer-brand {
  color: var(--text);
  font-weight: 650;
}

.footer-nav a,
.site-footer a {
  color: var(--muted);
}

.footer-nav a:hover,
.site-footer a:hover {
  color: var(--text);
}

/* --- Accueil ------------------------------------------------------------- */

.hero {
  padding: 4.5rem 0 3rem;
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 21ch;
  margin-bottom: 1.5rem;
  font-size: clamp(2.125rem, 1.4rem + 3.2vw, 3.375rem);
  line-height: 1.1;
}

.lead {
  max-width: 38rem;
  font-size: 1.1875rem;
  line-height: 1.6;
}

.status {
  display: inline-flex;
  align-items: baseline;
  gap: 0.625rem;
  margin: 0.75rem 0 0;
  padding: 0.5rem 0.875rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.status-dot {
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-0.05em);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.cards li + li {
  margin-top: 0;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  height: 100%;
  padding: 1.25rem 1.25rem 1.375rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
}

.card:hover {
  color: var(--text);
  border-color: var(--accent);
}

.card:focus-visible {
  outline-offset: 2px;
  border-radius: var(--radius);
}

.card-title {
  font-weight: 650;
}

.card-title::after {
  content: " →";
  content: " →" / "";
  color: var(--accent);
}

.card-text {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.contact-line {
  color: var(--muted);
}

/* --- Pages de contenu ---------------------------------------------------- */

.page-head {
  padding: 3.5rem 0 0.5rem;
}

.page-head h1 {
  max-width: 24ch;
}

.updated {
  color: var(--muted);
  font-size: 0.9375rem;
}

.prose {
  max-width: var(--measure);
}

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

.prose h2,
.prose h3 {
  scroll-margin-top: 1.5rem;
}

.prose .intro {
  font-size: 1.125rem;
}

.toc {
  margin: 1.5rem 0 0;
  padding: 1.25rem 1.375rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.toc-title {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 650;
}

.toc ol {
  margin: 0;
  font-size: 0.9375rem;
}

.toc li + li {
  margin-top: 0.25rem;
}

.note,
.warn {
  margin: 1.5rem 0;
  padding: 1rem 1.125rem;
  border-left: 3px solid var(--note-rule);
  border-radius: 0 8px 8px 0;
  background: var(--note-bg);
}

.warn {
  border-left-color: var(--warn-rule);
  background: var(--warn-bg);
}

.note > :last-child,
.warn > :last-child {
  margin-bottom: 0;
}

.path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.5rem;
  margin: 0 0 1.25rem;
}

.ui {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
}

/* An arrow travels with the item it points to, so a wrap never leaves one
   dangling at the end of a line. */
.path .hop {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.path .sep {
  color: var(--muted);
}

.steps {
  counter-reset: step;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.steps > li {
  position: relative;
  padding-left: 2.5rem;
  counter-increment: step;
}

.steps > li + li {
  margin-top: 0.75rem;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  display: grid;
  place-items: center;
  width: 1.625rem;
  height: 1.625rem;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 650;
}

.method {
  margin-top: 2.5rem;
  padding: 1.5rem 1.5rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.method h2 {
  margin-top: 0;
}

.method-label {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.email {
  display: inline-block;
  margin: 0.125rem 0 0.25rem;
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.625rem);
  font-weight: 650;
  letter-spacing: -0.01em;
}

dl.providers {
  margin: 0 0 1rem;
}

dl.providers dt {
  margin-top: 1rem;
  font-weight: 650;
}

dl.providers dd {
  margin: 0.125rem 0 0;
  color: var(--muted);
}

.page-end {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
}

/* --- Petits écrans ------------------------------------------------------- */

@media (max-width: 36rem) {
  :root {
    --gutter: 1rem;
  }

  body {
    font-size: 1rem;
  }

  .hero {
    padding: 2.75rem 0 2rem;
  }

  .lead {
    font-size: 1.0625rem;
  }

  .page-head {
    padding-top: 2.25rem;
  }

  h2 {
    margin-top: 2.5rem;
    font-size: 1.25rem;
  }

  .method {
    padding: 1.25rem 1rem 0.25rem;
  }
}

/* --- Impression ---------------------------------------------------------- */

@media print {
  :root {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #000000;
    --muted: #333333;
    --accent: #000000;
  }

  .site-nav,
  .skip-link,
  .footer-nav {
    display: none;
  }
}
