/* MCP D1 — page de configuration. Aucune ressource externe, aucune police distante. */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1c2024;
  --muted: #5a6472;
  --border: #d8dde4;
  --accent: #1f5fbf;
  --accent-soft: #e8f0fc;
  --code-bg: #1e2430;
  --code-text: #e8edf5;
  --note-bg: #fff8e6;
  --note-border: #e6c34a;
  --radius: 10px;
  --maxw: 60rem;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.75rem;
  z-index: 10;
}

.skip-link:focus {
  left: 0;
}

/* En-tête */

.site-header {
  background: linear-gradient(160deg, #16324f 0%, #1f5fbf 100%);
  color: #fff;
  padding: 2.5rem 0 2rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 600;
  opacity: 0.85;
}

.site-header h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  line-height: 1.2;
}

.lede {
  margin: 0 0 1.5rem;
  max-width: 46rem;
  font-size: 1.05rem;
  opacity: 0.95;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.75rem 1.5rem;
  margin: 0;
}

.facts div {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}

.facts dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
  margin-bottom: 0.25rem;
}

.facts dd {
  margin: 0;
  font-weight: 600;
  word-break: break-word;
}

/* Contenu */

main {
  padding-top: 2rem;
  padding-bottom: 1rem;
}

section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

section h2 {
  margin-top: 0;
  font-size: 1.3rem;
  border-bottom: 2px solid var(--accent-soft);
  padding-bottom: 0.5rem;
}

section h2::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-right: 0.6rem;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

p {
  margin: 0.75rem 0;
}

ul {
  padding-left: 1.25rem;
}

li {
  margin: 0.35rem 0;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  text-decoration-thickness: 2px;
}

/* Code */

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  background: var(--accent-soft);
  color: #123a75;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  word-break: break-word;
}

pre {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: var(--radius);
  padding: 1rem;
  overflow-x: auto;
  margin: 0.75rem 0;
  border: 1px solid #0f141d;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.55;
  white-space: pre;
  word-break: normal;
}

/* Encadrés */

.note {
  background: var(--note-bg);
  border-left: 4px solid var(--note-border);
  border-radius: 0 6px 6px 0;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.docs {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Tableau dépannage */

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
  font-size: 0.95rem;
}

caption {
  text-align: left;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

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

thead th {
  background: var(--accent-soft);
  color: #123a75;
}

tbody tr:last-child td {
  border-bottom: none;
}

/* Liens de référence */

.links {
  list-style: none;
  padding-left: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.4rem 1.5rem;
}

.links li {
  margin: 0;
}

/* Pied de page */

.site-footer {
  background: #16324f;
  color: #dbe4f0;
  padding: 1.5rem 0;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0.25rem 0;
}

/* Mobile */

@media (max-width: 40rem) {
  .site-header {
    padding: 1.75rem 0 1.5rem;
  }

  section {
    padding: 1.1rem;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead {
    position: absolute;
    left: -9999px;
  }

  td {
    border-bottom: none;
    padding: 0.35rem 0;
  }

  tbody tr {
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
  }

  td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
  }
}
