:root {
  --encre: #1c1915;
  --encre-douce: #4a433a;
  --papier: #f4efe6;
  --carte: #fffdf8;
  --ligne: #ddd4c6;
  --foret: #1e3330;
  --foret-2: #2c4a45;
  --cuivre: #9a4e24;
  --lien: #0e5c63;
  --ok-fond: #e4f2ea;
  --ok-encre: #124a30;
  --alerte-fond: #f8efd4;
  --alerte-encre: #6a4808;
  --erreur-fond: #f8e4df;
  --erreur-encre: #7a291f;
  --neutre-fond: #ece6db;
  --code-fond: #1e3330;
  --code-encre: #f6f1e7;
  --mesure: 74rem;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img, svg { max-width: 100%; }

a {
  color: var(--lien);
  text-underline-offset: 0.16em;
}

a:hover { color: var(--cuivre); }

:focus-visible {
  outline: 3px solid var(--cuivre);
  outline-offset: 3px;
}

.eviter {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  background: var(--carte);
  color: var(--encre);
  padding: 0.5rem 0.8rem;
  z-index: 5;
}

.eviter:focus { top: 0.75rem; }

.entete {
  background: var(--foret);
  color: var(--papier);
}

.entete-int,
.pied-int,
main {
  width: min(100% - 2rem, var(--mesure));
  margin-inline: auto;
}

.entete-int {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 0.85rem 0;
}

.marque {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--papier);
  font-family: var(--serif);
  font-size: 1.25rem;
  text-decoration: none;
}

.marque-symbole {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--papier);
}

.nav-details { width: 100%; }

.nav-details summary {
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--papier);
  font-weight: 650;
  list-style: none;
}

.nav-details summary::-webkit-details-marker { display: none; }

.nav-details summary::after {
  content: "＋";
  margin-left: 0.45rem;
  color: #e7b89a;
}

.nav-details[open] summary::after { content: "–"; }

.menu {
  list-style: none;
  margin: 0;
  padding: 0 0 0.8rem;
  display: none;
  flex-direction: column;
  gap: 0.15rem;
}

.nav-details[open] .menu { display: flex; }

.menu a {
  display: block;
  color: var(--papier);
  text-decoration: none;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(246, 241, 231, 0.18);
}

.menu a[aria-current="page"] {
  color: #f3c7ae;
  text-decoration: underline;
}

main { padding: 1.25rem 0 3rem; }

.fil ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.2rem;
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  color: var(--encre-douce);
  font-size: 0.92rem;
}

.fil li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: #8a7d6c;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 650;
  line-height: 1.25;
  color: var(--foret);
}

h1 { font-size: 1.85rem; margin: 0 0 0.8rem; }

h2 { font-size: 1.4rem; margin: 2rem 0 0.7rem; }

.surtitre {
  margin: 0 0 0.35rem;
  color: var(--cuivre);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chapeau, .hero .chapeau {
  font-size: 1.12rem;
  max-width: 42rem;
}

.hero, .bloc, .guide, .prose, .resultat-dns {
  margin-bottom: 1.5rem;
}

.formulaire {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: var(--carte);
  border: 1px solid var(--ligne);
  border-left: 4px solid var(--cuivre);
  padding: 1rem;
  margin: 1rem 0;
}

.champ { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }

label { font-weight: 650; }

input, select, button {
  font: inherit;
  color: var(--encre);
  min-height: 3rem;
}

input, select {
  width: 100%;
  background: #fff;
  border: 1px solid #b7ad9e;
  padding: 0.45rem 0.65rem;
}

button {
  background: var(--foret);
  color: var(--papier);
  border: 0;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  font-weight: 700;
}

button:hover { background: var(--cuivre); }

.aide { color: var(--encre-douce); font-size: 0.95rem; }

.puces { padding-left: 1.2rem; }

.puces li { margin: 0.25rem 0; }

.liste-guides {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.liste-guides a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: var(--carte);
  border: 1px solid var(--ligne);
  padding: 0.85rem 0.95rem;
  text-decoration: none;
  color: inherit;
}

.liste-guides a:hover { border-color: var(--cuivre); }

.liste-titre {
  color: var(--lien);
  font-family: var(--serif);
  font-size: 1.15rem;
  text-decoration: underline;
  text-underline-offset: 0.14em;
}

.liste-resume { color: var(--encre-douce); }

.sommaire {
  background: var(--carte);
  border: 1px solid var(--ligne);
  padding: 0.8rem 1rem 0.4rem;
  margin: 1.2rem 0 0.4rem;
}

.sommaire p { margin: 0 0 0.3rem; font-weight: 700; }

.guide, .prose, .faq { max-width: 42rem; }

pre.dig {
  background: var(--code-fond);
  color: var(--code-encre);
  padding: 0.9rem 1rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.45;
  border-left: 4px solid #c46a38;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
}

p code, li code, dd code {
  background: var(--neutre-fond);
  padding: 0.05em 0.28em;
}

.verdict {
  padding: 0.85rem 1rem;
  border: 1px solid var(--ligne);
  font-size: 1.05rem;
}

.verdict-texte {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.verdict-identique { background: var(--ok-fond); color: var(--ok-encre); }
.verdict-divergence { background: var(--alerte-fond); color: var(--alerte-encre); }
.verdict-absent { background: var(--neutre-fond); color: var(--encre); }
.verdict-impossible, .alerte { background: var(--erreur-fond); color: var(--erreur-encre); }

.alerte { padding: 0.85rem 1rem; }

.table-scroll {
  overflow-x: auto;
  margin: 1rem 0;
  border: 1px solid var(--ligne);
  background: var(--carte);
}

table.comparaison {
  width: 100%;
  border-collapse: collapse;
  min-width: 42rem;
  font-size: 0.98rem;
}

caption {
  text-align: left;
  font-weight: 700;
  padding: 0.7rem 0.8rem;
  caption-side: top;
}

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

thead th { background: var(--foret); color: var(--papier); border-top: 0; }

th .detail {
  display: block;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--encre-douce);
}

thead th .detail { color: #eadfce; }

.valeurs { list-style: none; margin: 0; padding: 0; }

.valeurs li { margin: 0.15rem 0; }

.valeurs code, td code { background: transparent; padding: 0; word-break: break-word; }

.code {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.code-noerror { color: var(--ok-encre); }
.code-nxdomain { color: var(--alerte-encre); }
.code-servfail, .code-timeout, .code-erreur, .code-refused { color: var(--erreur-encre); }

.type-titre {
  font-family: var(--mono);
  font-size: 0.7em;
  color: var(--cuivre);
}

.faq dt {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--foret);
  margin-top: 1.4rem;
}

.faq dd { margin: 0.4rem 0 0; }

.suite {
  margin-top: 2rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--ligne);
}

.pied {
  background: var(--foret);
  color: #eadfce;
  padding: 1.5rem 0 2rem;
}

.pied a { color: #f4efe6; }

.pied-marque {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin: 0 0 0.6rem;
}

.pied-liens {
  list-style: none;
  margin: 0 0 0.8rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pied-note { margin: 0; font-size: 0.92rem; }

@media (min-width: 48rem) {
  h1 { font-size: 2.35rem; }

  .nav-details { width: auto; }

  .nav-details summary { display: none; }

  .menu {
    display: flex;
    flex-direction: row;
    gap: 0.2rem 1.1rem;
    padding: 0;
  }

  .menu a { border-bottom: 0; padding: 0.2rem 0; }

  .formulaire {
    flex-direction: row;
    align-items: flex-end;
  }

  .formulaire .champ:first-child { flex: 1.4; }
  .formulaire .champ:nth-child(2) { flex: 1; }
  .formulaire button { flex: 0 0 auto; }

  .pied-liens { flex-direction: row; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
