/* RGAA Audit — feuille de style unique.
   Aucune police externe, aucun framework : tout est servi depuis ce fichier.
   Contrastes vérifiés AA (4.5:1 texte courant, 3:1 grands titres). */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --surface: #ffffff;
  --text: #14161a;
  --text-muted: #4e5563;
  --border: #e2e4ea;
  --border-strong: #c9cdd6;
  --accent: #2a4bd7;
  --accent-hover: #1e3ab0;
  --accent-soft: #eef1fd;
  --accent-text: #ffffff;
  --ok: #0b6b45;
  --ok-soft: #e7f5ee;
  --warn: #8a4b00;
  --warn-soft: #fdf1e3;
  --shadow-sm: 0 1px 2px rgba(16, 20, 32, .06), 0 1px 3px rgba(16, 20, 32, .04);
  --shadow-md: 0 6px 24px rgba(16, 20, 32, .08);
  --radius: 12px;
  --radius-lg: 18px;
  --wrap: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --bg-soft: #11161e;
    --surface: #151b24;
    --text: #e7eaf0;
    --text-muted: #a7b0be;
    --border: #232b37;
    --border-strong: #333d4d;
    --accent: #8fa8ff;
    --accent-hover: #b3c3ff;
    --accent-soft: #18213a;
    --accent-text: #0d1117;
    --ok: #6ee7b7;
    --ok-soft: #10251d;
    --warn: #f3b86b;
    --warn-soft: #2a2010;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, .45);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* --- Accessibilité : lien d'évitement, focus, masquage --- */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-text);
  padding: .75rem 1.25rem; border-radius: 0 0 var(--radius) 0;
  z-index: 100; font-weight: 600;
}
.skip:focus { left: 0; }

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

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

/* --- Structure --- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }

section { padding-block: clamp(3rem, 7vw, 5.5rem); }
section.tight { padding-block: clamp(2rem, 4vw, 3rem); }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--border); }

/* --- En-tête --- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); font-weight: 700; letter-spacing: -.01em; }
.brand-mark { color: var(--accent); flex: none; }
.brand-name { font-size: 1.0625rem; white-space: nowrap; }
.brand-light { font-weight: 500; color: var(--text-muted); }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-nav a:not(.btn) {
  color: var(--text-muted); text-decoration: none; font-size: .9375rem; font-weight: 500;
  padding: .35rem 0; border-bottom: 2px solid transparent;
}
.site-nav a:not(.btn):hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--border-strong);
  border-radius: 10px; padding: .55rem .7rem; cursor: pointer; color: var(--text);
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; inset-inline: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md); padding: 1rem 1.25rem 1.5rem;
    display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: .25rem; }
  .site-nav a:not(.btn) { display: block; padding: .7rem .25rem; border-bottom: 1px solid var(--border); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
  .site-nav .btn { margin-top: .75rem; justify-content: center; }
}

/* --- Boutons --- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--accent); color: var(--accent-text);
  border: 1px solid transparent; border-radius: 10px;
  padding: .8rem 1.35rem; font: inherit; font-weight: 600; font-size: .9375rem;
  text-decoration: none; cursor: pointer; transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn-small { padding: .55rem 1rem; font-size: .875rem; }
.btn-ghost {
  background: transparent; color: var(--text); border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--text-muted); }
.btn-lg { padding: 1rem 1.75rem; font-size: 1rem; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

@media (max-width: 560px) {
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; justify-content: center; }
}

/* --- Typographie --- */
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .65em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.1875rem; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
strong { font-weight: 650; }
.lead { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); color: var(--text-muted); max-width: 62ch; }
.muted { color: var(--text-muted); }
.small { font-size: .875rem; }

.eyebrow {
  display: inline-block; font-size: .8125rem; font-weight: 650; letter-spacing: .04em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); padding: .3rem .7rem; border-radius: 999px; margin-bottom: 1.1rem;
}

.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-head h2 { margin-bottom: .5rem; }

/* --- Héros --- */
.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(2.5rem, 6vw, 4.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin-bottom: 1rem; }
.hero .lead { margin-bottom: 1.75rem; }
.hero-note { margin-top: 1.25rem; font-size: .875rem; color: var(--text-muted); }

/* Carte de démonstration (aucune image externe) */
.demo {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); overflow: hidden;
}
.demo-bar { display: flex; align-items: center; gap: .4rem; padding: .75rem 1rem; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.demo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.demo-title { margin-left: .5rem; font-size: .8125rem; color: var(--text-muted); font-family: var(--mono); }
.demo-body { padding: 1.25rem 1.25rem 1.4rem; }
.demo-score { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .35rem; }
.demo-score-value { font-size: 2.25rem; font-weight: 700; letter-spacing: -.03em; }
.demo-score-label { color: var(--text-muted); font-size: .875rem; }
.meter { height: 8px; border-radius: 999px; background: var(--border); overflow: hidden; margin: .75rem 0 1.15rem; }
.meter-fill { height: 100%; width: 28%; background: var(--warn); border-radius: 999px; }
.demo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .9375rem; }
.demo-list li { display: flex; gap: .6rem; align-items: flex-start; }
.tag { flex: none; min-width: 3.1rem; text-align: center; font-family: var(--mono); font-size: .75rem; font-weight: 600; padding: .15rem .45rem; border-radius: 6px; background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 25%, transparent); }

/* --- Grilles et cartes --- */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--text-muted); font-size: .9375rem; }

.icon-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent); margin-bottom: .9rem;
}

/* --- Listes à coche --- */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.checklist li { display: flex; gap: .7rem; align-items: flex-start; }
.checklist .check { flex: none; margin-top: .28rem; color: var(--ok); }
.checklist.cross .check { color: var(--warn); }

/* --- Étapes --- */
.steps { display: grid; gap: 1.25rem; counter-reset: step; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.step-num {
  counter-increment: step; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: .9375rem;
}
.step-num::before { content: counter(step); }

/* --- Tarifs --- */
.prices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 820px) { .prices { grid-template-columns: 1fr; } }

.price {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 2rem; box-shadow: var(--shadow-sm); position: relative;
}
.price.is-featured { border-color: var(--accent); box-shadow: var(--shadow-md); }
.price-flag {
  position: absolute; top: -13px; left: 2rem;
  background: var(--accent); color: var(--accent-text);
  font-size: .75rem; font-weight: 650; letter-spacing: .03em; text-transform: uppercase;
  padding: .3rem .7rem; border-radius: 999px;
}
.price-name { font-size: 1.125rem; font-weight: 700; margin-bottom: .25rem; }
.price-desc { color: var(--text-muted); font-size: .9375rem; margin-bottom: 1.25rem; }
.price-amount { display: flex; align-items: baseline; gap: .4rem; margin-bottom: .25rem; }
.price-value { font-size: 2.5rem; font-weight: 700; letter-spacing: -.03em; }
.price-period { color: var(--text-muted); font-size: .9375rem; }
.price-sub { font-size: .8125rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.price .btn { width: 100%; justify-content: center; margin-bottom: 1.5rem; }
.price ul { margin: 0; }

/* --- FAQ --- */
.faq { display: grid; gap: .75rem; max-width: 68ch; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0; overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 1.1rem 1.25rem; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; font-size: 1.25rem; color: var(--accent); font-weight: 400; line-height: 1; flex: none;
}
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq .faq-body { padding: 1.1rem 1.25rem 1.25rem; color: var(--text-muted); font-size: .9375rem; }

/* --- Encarts --- */
.callout {
  border-radius: var(--radius); padding: 1.25rem 1.4rem; border: 1px solid var(--border);
  background: var(--bg-soft); font-size: .9375rem;
}
.callout-info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.callout-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.callout-ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.callout h3 { font-size: 1rem; margin-bottom: .4rem; }

/* --- Bandeau CTA --- */
.cta-band { background: var(--text); color: var(--bg); border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3.25rem); }
.cta-band h2 { color: inherit; }
.cta-band p { color: color-mix(in srgb, var(--bg) 78%, transparent); max-width: 55ch; }
.cta-band .btn { background: var(--bg); color: var(--text); }
.cta-band .btn:hover { background: color-mix(in srgb, var(--bg) 88%, transparent); }

/* --- Contenu long (pages légales) --- */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 1.75rem; }
.prose ul, .prose ol { padding-left: 1.35rem; margin: 0 0 1.1em; }
.prose li { margin-bottom: .45rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: .9375rem; }
.prose th, .prose td { text-align: left; padding: .7rem .8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { font-weight: 650; }
.prose code { font-family: var(--mono); font-size: .875em; background: var(--bg-soft); padding: .15em .4em; border-radius: 5px; }
.prose blockquote {
  margin: 1.25rem 0; padding: .9rem 1.2rem; border-left: 3px solid var(--accent);
  background: var(--bg-soft); border-radius: 0 var(--radius) var(--radius) 0;
}

/* --- Tableaux défilants (pages légales sur mobile) --- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.25rem 0; }
.table-scroll table { margin: 0; }
.table-scroll:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* --- Tableau comparatif --- */
.compare { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.compare th, .compare td { padding: .85rem 1rem; border-bottom: 1px solid var(--border); text-align: left; }
.compare thead th { font-weight: 650; background: var(--bg-soft); }
.compare td.yes { color: var(--ok); font-weight: 600; }
.compare td.no { color: var(--text-muted); }

/* --- Pied de page --- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding-block: 3rem 1.5rem; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; } }
.footer-brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; margin-bottom: .5rem; }
.footer-brand .brand-mark { color: var(--accent); }
.footer-note { color: var(--text-muted); font-size: .875rem; }
.footer-title { font-size: .8125rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: .75rem; font-weight: 650; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .9375rem; }
.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border);
  font-size: .8125rem; color: var(--text-muted);
}
.footer-bottom p { margin: 0; max-width: 60ch; }

/* --- Impression --- */
@media print {
  .site-header, .site-footer, .cta-band, .nav-toggle, .skip { display: none !important; }
  body { color: #000; background: #fff; font-size: 11pt; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  section { padding-block: 1rem; }
}
