/* French E-Invoicing Checker — one accent colour, system fonts, no external assets. */

:root {
  --accent: #1f5fd6;
  --accent-hover: #1a4fb4;
  --accent-soft: #eaf1fd;

  --bg: #ffffff;
  --bg-alt: #f7f8fa;
  --surface: #ffffff;
  --border: #e2e5ea;
  --border-strong: #c9cfd8;

  --text: #14181f;
  --text-muted: #5b6572;

  --ok-bg: #e8f6ee;
  --ok-text: #14663c;
  --warn-bg: #fdf3e3;
  --warn-text: #7a4c06;

  --radius: 10px;
  --maxw: 720px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 4px 14px rgba(16, 24, 40, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #6ea3ff;
    --accent-hover: #8ab6ff;
    --accent-soft: #16233a;

    --bg: #0e1117;
    --bg-alt: #141922;
    --surface: #161b24;
    --border: #262d39;
    --border-strong: #38414f;

    --text: #e8ecf2;
    --text-muted: #99a3b1;

    --ok-bg: #10301f;
    --ok-text: #78d3a1;
    --warn-bg: #33280f;
    --warn-text: #e7bd6a;

    --shadow: none;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- header / footer ---- */

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

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  flex-wrap: wrap;
}

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

/* Maker credit next to the site name. Deliberately quiet: the site is a
   neutral utility, the byline is disclosure, not a pitch. `margin-right: auto`
   keeps it grouped with the brand while the nav stays hard right. */
.byline {
  margin-right: auto;
  margin-left: -6px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
}

.byline:hover {
  color: var(--accent);
  text-decoration: underline;
}

.site-nav {
  display: flex;
  gap: 18px;
  font-size: 0.94rem;
}

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

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--accent);
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 28px 0 44px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.site-footer p {
  margin: 0 0 8px;
}

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

/* ---- typography ---- */

h1 {
  font-size: clamp(1.85rem, 5vw, 2.45rem);
  line-height: 1.2;
  letter-spacing: -0.022em;
  margin: 40px 0 12px;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.3;
  letter-spacing: -0.014em;
  margin: 44px 0 12px;
}

h3 {
  font-size: 1.06rem;
  margin: 26px 0 6px;
}

p {
  margin: 0 0 14px;
}

a {
  color: var(--accent);
}

.lede {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 26px;
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 0.86rem;
}

code,
.mono {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas,
    monospace;
  font-size: 0.92em;
}

code {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
}

/* ---- form controls ---- */

.search {
  display: flex;
  gap: 10px;
  margin: 0 0 10px;
  flex-wrap: wrap;
}

input[type='text'],
input[type='search'],
input[type='email'] {
  flex: 1 1 240px;
  min-width: 0;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 11px 13px;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button {
  font: inherit;
  font-weight: 550;
  cursor: pointer;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 11px 18px;
  background: var(--accent);
  color: #fff;
  transition: background 0.12s ease;
}

@media (prefers-color-scheme: dark) {
  button {
    color: #0e1117;
  }
}

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

button[disabled] {
  opacity: 0.55;
  cursor: default;
}

button.secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--border-strong);
}

button.secondary:hover {
  background: var(--accent-soft);
}

/* ---- cards & results ---- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.matches {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.match {
  width: 100%;
  text-align: left;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 15px;
  font-weight: 400;
}

.match:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.match-name {
  font-weight: 600;
  display: block;
}

.match-meta {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 2px 9px;
  vertical-align: 2px;
}

.badge-ok {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.badge-warn {
  background: var(--warn-bg);
  color: var(--warn-text);
}

/* Provisional DGFiP registration is the normal state for almost every
   platform in 2026 — colouring it amber would read as a warning. */
.badge-neutral {
  background: var(--bg-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.identity {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 18px;
  margin: 14px 0 20px;
  font-size: 0.95rem;
}

.identity dt {
  color: var(--text-muted);
}

.identity dd {
  margin: 0;
}

.cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-big {
  font-size: 1.02rem;
  padding: 14px 20px;
}

.status {
  min-height: 1.4em;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.error {
  background: var(--warn-bg);
  color: var(--warn-text);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 16px;
}

/* ---- guide steps ---- */

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

.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 40px;
  margin-bottom: 20px;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.fr {
  font-style: italic;
}

.phrase {
  border-left: 3px solid var(--border-strong);
  padding: 2px 0 2px 14px;
  margin: 12px 0;
}

.phrase .fr {
  display: block;
  color: var(--text);
}

.phrase .en {
  display: block;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ---- FAQ ---- */

details {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

details summary {
  cursor: pointer;
  font-weight: 570;
  list-style: none;
}

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

details summary::before {
  content: '+';
  color: var(--accent);
  font-weight: 700;
  display: inline-block;
  width: 20px;
}

details[open] summary::before {
  content: '\2212';
}

details > *:not(summary) {
  margin-top: 10px;
}

/* ---- tables ---- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  white-space: nowrap;
}

th {
  background: var(--bg-alt);
  font-weight: 600;
  position: sticky;
  top: 0;
}

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

.tick {
  color: var(--ok-text);
  font-weight: 700;
}

.cross {
  color: var(--text-muted);
}

/* ---- misc ---- */

.section {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 48px;
}

.hidden {
  display: none !important;
}

.subscribe {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 44px;
}

.subscribe h2 {
  margin-top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
