/* e-Facture TPE. Gris papier, encre marine, un bleu net pour les actions ; le verdict du vérificateur est un tampon. */
:root {
  --bg: #f4f6f9;
  --paper: #ffffff;
  --line: #d9dfe8;
  --ink: #10243e;
  --ink-soft: #55657a;
  --blue: #1f6feb;
  --blue-dark: #1557c0;
  --ok: #1a7f4b;
  --warn: #a15c00;
  --ko: #b3261e;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 40rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--text); font-size: 1.05rem; line-height: 1.6; }
a { color: var(--blue-dark); text-underline-offset: 0.18em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.wrap { max-width: 54rem; margin: 0 auto; padding: 0 1.25rem; }

.site-header { padding: 1.1rem 0 0.4rem; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 1.5rem; }
.brand { font-weight: 700; font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; font-size: 0.97rem; }
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

h1 { font-weight: 700; font-size: clamp(1.9rem, 4.6vw, 2.7rem); line-height: 1.1; letter-spacing: -0.02em; margin: 1.5rem 0 0.5rem; }
h2 { font-weight: 700; font-size: 1.4rem; line-height: 1.25; margin: 2.75rem 0 0.75rem; }
.lede { color: var(--ink-soft); max-width: var(--measure); margin: 0 0 1.5rem; font-size: 1.1rem; }
.prose { max-width: var(--measure); }
.prose p, .prose li { margin: 0 0 0.8rem; }

/* Étapes du guide : une vraie séquence */
.etapes { counter-reset: e; list-style: none; padding: 0; margin: 1.5rem 0; max-width: 44rem; }
.etapes li { counter-increment: e; position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem 1rem 0.9rem 3.3rem; margin-bottom: 0.6rem; }
.etapes li::before { content: counter(e); position: absolute; left: 1rem; top: 0.85rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; }

/* Vérificateur */
.depot { position: relative; background: var(--paper); border: 2px dashed #a9b6c8; border-radius: 14px; padding: 2.2rem 1.5rem; text-align: center; transition: border-color 0.15s, background 0.15s; }
.depot.survol { border-color: var(--blue); background: #eef4ff; }
.depot label { font-size: 1.15rem; cursor: pointer; }
.depot label b { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 0.2em; }
.depot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.depot input:focus-visible + .aide { outline: 3px solid var(--blue); }
.aide { color: var(--ink-soft); font-size: 0.9rem; margin: 0.4rem 0 0; }
#resultat { margin-top: 1.4rem; }
.attente { color: var(--ink-soft); }

.verdict { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem 1.1rem 11rem; min-height: 5.5rem; }
.verdict p { margin: 0; }
.tampon { position: absolute; left: 1.1rem; top: 50%; transform: translateY(-50%) rotate(-7deg); border: 3px solid currentColor; border-radius: 6px; padding: 0.3rem 0.6rem; font-weight: 700; font-size: 1.05rem; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.9; max-width: 9rem; text-align: center; line-height: 1.15; }
.verdict-ok .tampon { color: var(--ok); }
.verdict-warn .tampon { color: var(--warn); }
.verdict-ko .tampon { color: var(--ko); }

.facture { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; margin-top: 0.8rem; overflow: hidden; }
.facture-tete { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); border-bottom: 1px solid var(--line); }
.facture-tete div, .facture-parties div { padding: 0.8rem 1rem; }
.facture-tete b { font-size: 1.25rem; display: block; }
.facture-parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.lib { display: block; color: var(--ink-soft); font-size: 0.82rem; }
.id { display: block; color: var(--ink-soft); font-size: 0.88rem; }

.controles { list-style: none; padding: 0; margin: 0.8rem 0 0; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.controles li { display: flex; gap: 0.6rem; align-items: baseline; padding: 0.55rem 1rem; border-bottom: 1px solid var(--line); font-size: 0.97rem; }
.controles li:last-child { border-bottom: 0; }
.pastille { width: 0.7rem; height: 0.7rem; border-radius: 50%; flex: none; transform: translateY(0.05rem); }
.controles .ok .pastille { background: var(--ok); }
.controles .warn .pastille { background: var(--warn); }
.controles .error .pastille { background: var(--ko); }
.controles .error b { color: var(--ko); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.limite { color: var(--ink-soft); font-size: 0.88rem; margin-top: 0.8rem; }

/* Comparatif */
.cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.carte { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; display: flex; flex-direction: column; }
.carte h2 { margin: 0 0 0.2rem; font-size: 1.3rem; }
.carte p { margin: 0 0 0.5rem; font-size: 0.97rem; }
.pour { color: var(--ink-soft); }
.bouton { margin-top: auto; align-self: flex-start; background: var(--blue); color: #fff; text-decoration: none; font-weight: 600; padding: 0.5rem 0.9rem; border-radius: 8px; }
.bouton:hover { background: var(--blue-dark); color: #fff; }

.table-wrap { overflow-x: auto; margin: 1rem 0; }
table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 0.97rem; }
th, td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); }
th { background: #e9eef5; font-weight: 600; }

details { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; margin: 0 0 0.6rem; padding: 0.7rem 1rem; max-width: var(--measure); }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 0.6rem 0 0.1rem; }

.site-footer { margin-top: 4rem; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.9rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }
.site-footer a { color: var(--ink-soft); }
@media (max-width: 560px) { .verdict { padding: 4.2rem 1rem 1rem; } .tampon { top: 1rem; transform: rotate(-5deg); } }
@media (prefers-reduced-motion: reduce) { .depot { transition: none; } }
