/* Feuille de style du site Lynxis.
 *
 * La palette reprend celle de l'application pour que le site et le produit se
 * ressemblent. Les regles d'interface du projet s'appliquent ici aussi, par
 * coherence de marque :
 *   - aucun emoji : les pictogrammes sont des SVG inline traces au trait ;
 *   - aucun tiret cadratin ni demi-cadratin, y compris dans le contenu genere ;
 *   - aucun liseret colore a gauche des cards : pour distinguer un bloc, on
 *     utilise un fond teinte et un rayon, jamais une barre verticale ;
 *   - les badges et pastilles ne s'etirent pas dans un conteneur flex, ils sont
 *     alignes en haut pour garder leur taille naturelle.
 */

:root {
  --bg: #0d1117;
  --panel: #161b22;
  --panel2: #1c2330;
  --border: #2a3340;
  --border-soft: #212a35;
  --text: #e6edf3;
  --muted: #9aa4af;
  --accent: #2f81f7;
  --accent-strong: #1f6feb;
  --link: #58a6ff;
  --ok: #3fb950;
  --warn: #d29922;
  --danger: #ff7b72;
  --danger-strong: #d5323b;

  --wrap: 1140px;
  --radius: 12px;
  --radius-sm: 8px;
  --gap: 22px;
}

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

html {
  background: var(--bg);
  scroll-behavior: smooth;
  /* Les ancres du sommaire ne doivent pas passer sous l'en-tete colle. */
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 650;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.15rem);
}

h2 {
  font-size: clamp(1.45rem, 1.15rem + 1.3vw, 2.05rem);
}

h3 {
  font-size: 1.06rem;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--panel2);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 0.12em 0.42em;
  color: #cbd5e1;
  white-space: nowrap;
}

strong {
  color: #f4f8fb;
  font-weight: 650;
}

/* Fine barre de defilement, comme dans l'application. */
* {
  scrollbar-width: thin;
  scrollbar-color: #313c4b transparent;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #313c4b;
  border-radius: 4px;
  border: 2px solid var(--bg);
}

/* ---- Utilitaires ---- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent-strong);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
}

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

.ico {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ico-lg {
  width: 24px;
  height: 24px;
  stroke-width: 1.6;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}

.lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 68ch;
}

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

/* ---- Boutons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-lg {
  padding: 13px 24px;
  font-size: 1rem;
}

.btn-primary {
  background: var(--accent-strong);
  color: #fff;
}

.btn-primary:hover {
  background: #2b7bf0;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: #3c4a5c;
  background: var(--panel);
}

/* ---- En-tete ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  display: block;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 1.08rem;
  font-weight: 680;
  letter-spacing: -0.01em;
}

.brand-vendor {
  font-size: 0.72rem;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 550;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

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

.site-nav a.current {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.nav-cta {
  padding: 8px 15px;
  font-size: 0.88rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 38px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.18s, opacity 0.18s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Hero ---- */

.hero {
  position: relative;
  padding: clamp(60px, 8vw, 108px) 0 clamp(50px, 6vw, 84px);
  overflow: hidden;
}

/* Halo diffus derriere le titre : profondeur sans image a charger. */
.hero::before {
  content: "";
  position: absolute;
  top: -220px;
  left: 50%;
  width: 900px;
  height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(47, 129, 247, 0.16), transparent 68%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
}

.hero h1 {
  max-width: 18ch;
}

.hero .lede {
  margin-top: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-actions-center {
  justify-content: center;
}

/* Groupe de boutons intercale dans un bloc de texte : moins d'air au-dessus que
   sous un titre de hero. Une classe plutot qu'un style inline, que la CSP du
   site bloquerait (style-src 'self', sans 'unsafe-inline'). */
.hero-actions-tight {
  margin-top: 22px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 56px 0 0;
  padding: 26px 0 0;
  list-style: none;
  border-top: 1px solid var(--border-soft);
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 680;
  letter-spacing: -0.02em;
  color: var(--text);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---- En-tete de page interieure ---- */

.page-head {
  padding: clamp(48px, 6vw, 80px) 0 clamp(32px, 4vw, 48px);
  border-bottom: 1px solid var(--border-soft);
}

.page-head-center {
  text-align: center;
}

.page-head-center .lede {
  margin-left: auto;
  margin-right: auto;
}

/* ---- Sections ---- */

.section {
  padding: clamp(52px, 6.5vw, 88px) 0;
}

.section-alt {
  background: var(--panel);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.section-head {
  max-width: 72ch;
  margin-bottom: 40px;
}

.section-head p {
  color: var(--muted);
  font-size: 1.02rem;
}

.section-head-left {
  display: flex;
  /* Aligne en haut pour que la pastille d'icone garde sa taille naturelle
     au lieu de s'etirer sur la hauteur du bloc de texte. */
  align-items: flex-start;
  gap: 16px;
  max-width: 76ch;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(47, 129, 247, 0.13);
  color: var(--accent);
}

/* ---- Grilles ---- */

.grid {
  display: grid;
  gap: var(--gap);
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-gap-lg {
  gap: 28px;
}

/* ---- Cards ---- */

.card {
  padding: 26px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, transform 0.15s;
}

.section-alt .card {
  background: var(--bg);
}

.card:hover {
  border-color: #3a4759;
  transform: translateY(-2px);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  background: rgba(47, 129, 247, 0.13);
  color: var(--accent);
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---- Bloc "note" : fond teinte et rayon, jamais de barre verticale a gauche ---- */

.note {
  padding: 22px 24px;
  background: rgba(47, 129, 247, 0.07);
  border: 1px solid rgba(47, 129, 247, 0.2);
  border-radius: var(--radius);
}

.note h3 {
  color: var(--text);
}

.note p {
  color: var(--muted);
  font-size: 0.95rem;
}

.note-wide {
  max-width: 82ch;
}

/* ---- Callout ---- */

.callout {
  padding: 30px 32px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.section-alt .callout {
  background: var(--bg);
}

.callout h2 {
  font-size: 1.35rem;
}

.callout p {
  color: var(--muted);
  max-width: 82ch;
}

.callout-key {
  display: flex;
  /* Meme raison que section-head-left : la pastille ne doit pas s'etirer. */
  align-items: flex-start;
  gap: 20px;
  background: rgba(47, 129, 247, 0.07);
  border-color: rgba(47, 129, 247, 0.24);
}

.callout-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: rgba(47, 129, 247, 0.16);
  color: var(--accent);
}

/* ---- Chaine : schema de flux ----
 * Quatre etapes reliees par un fil continu, horizontal sur grand ecran et
 * vertical sur petit. Le fil est un pseudo-element de la liste, pas une image :
 * il suit donc la mise en page a toutes les tailles sans jamais se desaligner.
 * La numerotation encode une vraie sequence (chaque etape consomme la
 * precedente), elle n'est pas decorative.
 */

.chain {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Le fil qui relie les etapes, derriere les pastilles. */
.chain::before {
  content: "";
  position: absolute;
  top: 25px;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(
    90deg,
    rgba(47, 129, 247, 0.15),
    rgba(47, 129, 247, 0.55),
    rgba(47, 129, 247, 0.15)
  );
}

.chain-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.chain-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  /* Fond opaque : la pastille doit masquer le fil qui passe dessous. */
  background: var(--panel2);
  border: 2px solid rgba(47, 129, 247, 0.45);
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
}

.section-alt .chain-num {
  background: var(--bg);
}

.chain-body h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.chain-body p {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 30ch;
  margin-inline: auto;
}

/* Variante en liste : etapes numerotees d'une procedure, ou l'alignement a
   gauche et le texte long conviennent mieux qu'un flux. */
.chain-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.chain-list::before {
  display: none;
}

.chain-list .chain-step {
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 24px;
  text-align: left;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.section-alt .chain-list .chain-step {
  background: var(--bg);
}

.chain-list .chain-num {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border-color: transparent;
  background: rgba(47, 129, 247, 0.13);
}

.chain-list .chain-body p {
  max-width: none;
  margin-inline: 0;
  font-size: 0.95rem;
}

/* ---- Split : texte + liste ---- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

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

.split-text .btn {
  margin-top: 8px;
}

/* ---- Listes a puces avec icone ---- */

.checklist,
.bullets {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li,
.bullets li {
  display: flex;
  /* L'icone ne doit pas s'etirer quand le texte passe sur deux lignes. */
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--muted);
}

.checklist li .ico,
.bullets li .ico {
  margin-top: 3px;
  color: var(--ok);
}

.bullets-warn li .ico {
  color: var(--warn);
}

.checklist li span,
.bullets li span {
  min-width: 0;
}

/* Variante sur une ligne : points de rassurance courts, places sous un schema
   ou un bloc, plutot qu'en colonne a cote d'un texte. */
.checklist-inline {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 30px;
  margin-top: 26px;
}

@media (max-width: 780px) {
  .checklist-inline {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- Panneau ---- */

.panel {
  padding: 28px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.section-alt .panel {
  background: var(--bg);
}

.panel h2 {
  font-size: 1.28rem;
}

.panel-lede {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.panel-tag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(47, 129, 247, 0.15);
  border: 1px solid rgba(47, 129, 247, 0.3);
  color: var(--link);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  /* Une pastille dans un conteneur flex ne doit jamais s'etirer. */
  align-self: flex-start;
}

.panel-tag-warn {
  background: rgba(210, 153, 34, 0.15);
  border-color: rgba(210, 153, 34, 0.34);
  color: #e3b341;
}

/* ---- Sommaire d'ancres ---- */

.toc {
  position: sticky;
  top: 68px;
  z-index: 30;
  background: rgba(22, 27, 34, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}

.toc-inner {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-top: 10px;
  padding-bottom: 10px;
  scrollbar-width: none;
}

.toc-inner::-webkit-scrollbar {
  display: none;
}

.toc a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 550;
  white-space: nowrap;
}

.toc a:hover {
  color: var(--text);
  background: var(--panel2);
  border-color: var(--border);
  text-decoration: none;
}

.toc a .ico {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

/* ---- Liste de fonctionnalites ---- */

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
}

.feature-item {
  padding: 20px 22px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.section-alt .feature-item {
  background: var(--bg);
}

.feature-item dt {
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 650;
  color: var(--text);
}

.feature-item dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

/* ---- Limites ---- */

.limit-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.limit-item {
  display: flex;
  /* La pastille garde son diametre quel que soit le texte. */
  align-items: flex-start;
  gap: 14px;
  padding: 22px 24px;
  background: rgba(255, 123, 114, 0.06);
  border: 1px solid rgba(255, 123, 114, 0.2);
  border-radius: var(--radius);
}

.limit-mark {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--danger);
}

.limit-item h3 {
  margin-bottom: 5px;
}

.limit-item p {
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---- Notation A a F ---- */

.grades {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.grade {
  display: flex;
  /* Le marqueur de note ne doit pas s'etirer sur la hauteur du texte. */
  align-items: flex-start;
  gap: 18px;
  padding: 22px 24px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.section-alt .grade {
  background: var(--bg);
}

.grade-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 58px;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.grade-a {
  background: #2f7d3a;
}

.grade-b {
  background: #8a6d16;
}

.grade-d {
  background: #a8541c;
}

.grade-f {
  background: var(--danger-strong);
}

.grade-body h3 {
  margin-bottom: 4px;
}

.grade-body p {
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---- Tableau de reference ---- */

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

.ref-table tr + tr th,
.ref-table tr + tr td {
  border-top: 1px solid var(--border-soft);
}

.ref-table th {
  width: 42%;
  padding: 11px 12px 11px 0;
  text-align: left;
  font-weight: 500;
  vertical-align: top;
}

.ref-table td {
  padding: 11px 0;
  color: var(--muted);
  vertical-align: top;
}

/* ---- Comparatif ----
 * Les verdicts utilisent une couleur semantique (bon / partiel / absent), tenue
 * separee de l'accent de marque : le bleu identifie Lynxis, il ne doit pas aussi
 * vouloir dire "correct". Chaque pastille porte son texte, donc la couleur n'est
 * jamais le seul porteur de l'information. */

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.cmp-group {
  margin-bottom: 34px;
}

.cmp-group:last-of-type {
  margin-bottom: 0;
}

.cmp-group-title {
  margin-bottom: 4px;
  font-size: 1.12rem;
}

.cmp-group-note {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.94rem;
  max-width: 76ch;
}

/* Le tableau defile horizontalement dans son propre conteneur : le corps de la
   page ne doit jamais partir de travers sur un petit ecran. */
.cmp-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel2);
}

.section-alt .cmp-wrap {
  background: var(--bg);
}

.cmp {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.cmp thead th {
  padding: 13px 16px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.cmp .cmp-col {
  width: 148px;
}

/* La colonne du produit est legerement mise en avant, sans crier. */
.cmp .cmp-col-us {
  color: var(--link);
  background: rgba(47, 129, 247, 0.06);
}

.cmp tbody th {
  padding: 15px 16px;
  text-align: left;
  font-weight: 500;
  vertical-align: top;
}

.cmp tbody td {
  padding: 15px 16px;
  vertical-align: top;
}

.cmp tbody td:last-child {
  background: rgba(47, 129, 247, 0.06);
}

.cmp tbody tr + tr th,
.cmp tbody tr + tr td {
  border-top: 1px solid var(--border-soft);
}

.cmp-what {
  display: block;
  color: var(--text);
  font-weight: 600;
}

.cmp-note {
  display: block;
  margin-top: 4px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
}

.cmp-footnote {
  margin-top: 26px;
  max-width: 82ch;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Pastille de verdict : ne s'etire jamais, garde sa taille naturelle. */
.verdict {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
}

.verdict-oui {
  background: rgba(63, 185, 80, 0.14);
  border-color: rgba(63, 185, 80, 0.34);
  color: #56d364;
}

.verdict-partiel {
  background: rgba(210, 153, 34, 0.14);
  border-color: rgba(210, 153, 34, 0.34);
  color: #e3b341;
}

.verdict-non {
  background: rgba(255, 123, 114, 0.12);
  border-color: rgba(255, 123, 114, 0.3);
  color: var(--danger);
}

/* ---- Schemas ----
 * Les traces SVG heritent des couleurs du theme via les variables, plutot que de
 * porter des couleurs en dur : un changement de palette les suit sans retouche.
 * Le viewBox les rend fluides ; en dessous d'une certaine largeur le texte
 * deviendrait illisible, on laisse alors le schema defiler dans son cadre plutot
 * que de le reduire indefiniment.
 */

.diagram {
  margin: 0;
  padding: 26px 24px 20px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.section-alt .diagram {
  background: var(--bg);
}

.diagram-scroll {
  overflow-x: auto;
}

.diagram-svg {
  display: block;
  width: 100%;
  height: auto;
  color: var(--accent);
}

.diagram figcaption,
.diagram-caption {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 84ch;
}

/* Noeuds */
.dg-node rect,
.dg-attacker rect {
  fill: rgba(154, 164, 175, 0.07);
  stroke: var(--border);
  stroke-width: 1.4;
}

.dg-attacker rect {
  fill: rgba(255, 123, 114, 0.09);
  stroke: rgba(255, 123, 114, 0.35);
}

.dg-verdict rect {
  fill: rgba(47, 129, 247, 0.11);
  stroke: rgba(47, 129, 247, 0.45);
  stroke-width: 1.6;
}

/* Textes */
.dg-label {
  fill: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.dg-label-strong {
  fill: var(--link);
  font-size: 16px;
  font-weight: 700;
}

.dg-sub {
  fill: var(--muted);
  font-size: 11px;
}

.dg-verdict-text {
  fill: #56d364;
  font-size: 11.5px;
  font-weight: 650;
}

.dg-edge-label {
  fill: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

/* Liens */
.dg-probe path {
  fill: none;
  stroke: var(--danger);
  stroke-width: 1.2;
  opacity: 0.5;
  color: var(--danger);
}

.dg-share path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  opacity: 0.75;
  color: var(--accent);
}

/* ---- Scenarios ---- */

.scenarios {
  display: grid;
  gap: 22px;
}

.scenario {
  padding: 26px 28px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.scenario-head {
  display: flex;
  /* La pastille d'icone garde sa taille : alignement en haut. */
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
}

.scenario-head .card-icon {
  margin-bottom: 0;
}

.scenario-head h3 {
  margin-bottom: 5px;
}

.scenario-setup {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 88ch;
}

.scenario-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 26px;
  align-items: start;
}

.scenario-col p {
  color: var(--muted);
  font-size: 0.94rem;
}

.panel-tag-muted {
  background: rgba(154, 164, 175, 0.12);
  border-color: rgba(154, 164, 175, 0.28);
  color: var(--muted);
}

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

.faq {
  display: grid;
  gap: 12px;
  max-width: 92ch;
}

.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 22px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  list-style: none;
}

/* Retire le triangle natif, remplace par un chevron dessine. */
.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: var(--link);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.faq-chevron {
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.16s;
}

.faq-item[open] .faq-chevron {
  transform: rotate(-135deg) translate(-3px, -3px);
}

.faq-item p {
  padding: 0 22px 20px;
  margin: 0;
  max-width: 88ch;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---- Appel a l'action ---- */

.cta {
  padding: clamp(56px, 7vw, 92px) 0;
  border-top: 1px solid var(--border-soft);
  background:
    radial-gradient(ellipse 720px 300px at 50% 0%, rgba(47, 129, 247, 0.13), transparent 70%),
    var(--bg);
}

.cta-inner {
  text-align: center;
}

.cta-inner p {
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
  font-size: 1.05rem;
}

.cta-inner .hero-actions {
  justify-content: center;
}

/* ---- Pied de page ---- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  background: var(--panel);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-top: 52px;
  padding-bottom: 40px;
}

.footer-brand p {
  margin-top: 14px;
  max-width: 44ch;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-nav h2 {
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text);
}

.footer-nav ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-legal {
  padding-top: 22px;
  padding-bottom: 34px;
  border-top: 1px solid var(--border-soft);
}

.footer-legal p {
  max-width: 90ch;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-copy {
  margin-top: 10px;
  color: #74808c;
}

/* ---- Badge de version du site ----
 * Epingle en bas a gauche, toujours visible. Volontairement discret : c'est une
 * information de maintenance, pas un element de la page.
 *
 * pointer-events: none garantit qu'il n'intercepte jamais un clic destine au
 * contenu qui passe dessous, notamment sur petit ecran ou l'espace est compte.
 * Il reste lisible, simplement non cliquable, ce qui est sans consequence :
 * ce n'est pas un element interactif.
 */
/* Etat par defaut : dans le flux, a la fin du pied de page. C'est le repli sur
   petit ecran, ou un element flottant finirait par recouvrir un bouton. */
.site-version {
  display: inline-block;
  margin: 14px 0 0;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  user-select: none;
}

/* Des qu'il y a la place, le badge est epingle en bas a gauche de l'ecran et
   reste visible pendant le defilement.
   Les deux conditions comptent : la largeur seule ne suffit pas, un telephone en
   paysage est large mais trop court, et le badge y recouvrait le sommaire.
   pointer-events: none par securite : meme epingle, il n'intercepte jamais un
   clic destine au contenu qui passe dessous. Ce n'est pas un element
   interactif, donc rien n'est perdu. */
@media (min-width: 700px) and (min-height: 560px) {
  .site-version {
    position: fixed;
    left: 12px;
    bottom: 12px;
    z-index: 20;
    margin: 0;
    background: rgba(22, 27, 34, 0.82);
    backdrop-filter: blur(6px);
    pointer-events: none;
  }
}

@media print {
  .site-version {
    position: static;
    border: 0;
    background: none;
  }
}

/* ---- Adaptatif ---- */

@media (max-width: 940px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* Point de rupture de la NAVIGATION, distinct de celui du contenu.
 *
 * La barre horizontale doit basculer en menu deroulant avant de manquer de
 * place, pas quand l'ecran devient "petit". Mesure faite au navigateur : avec
 * sept entrees plus le bouton, l'ensemble occupe environ 890 px a droite de la
 * marque. En dessous d'a peu pres 880 px le bouton sortait de l'ecran et la page
 * partait de travers. Le seuil est donc pose a 1000 px, ce qui laisse une marge
 * confortable plutot que de fonctionner de justesse.
 *
 * A tenir a jour : toute entree ajoutee a la navigation elargit ce besoin.
 * Remesurer et remonter ce seuil le cas echeant, sinon le defaut revient.
 */
@media (max-width: 1000px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 16px 24px 22px;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  /* Cible tactile d'au moins 44 px de haut, la taille recommandee pour un
     doigt. Le remplissage vertical fait le travail, pas la taille du texte. */
  .site-nav a {
    padding: 13px 4px;
    border-bottom: 1px solid var(--border-soft);
  }

  .site-nav a.current {
    border-bottom-color: var(--accent);
  }

  .nav-cta {
    justify-content: center;
    margin-top: 12px;
  }
}

@media (max-width: 780px) {
  html {
    scroll-padding-top: 76px;
  }

  .toc {
    top: 60px;
  }

  .grid-2,
  .grid-3,
  .feature-list,
  .limit-list,
  .grades,
  .scenario-cols {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Le schema de flux bascule a la verticale : le fil passe a gauche des
     pastilles, le texte s'aligne a gauche. */
  .chain {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .chain::before {
    top: 12px;
    bottom: 12px;
    left: 24px;
    right: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(
      180deg,
      rgba(47, 129, 247, 0.15),
      rgba(47, 129, 247, 0.55),
      rgba(47, 129, 247, 0.15)
    );
  }

  .chain-step {
    flex-direction: row;
    align-items: flex-start;
    gap: 18px;
    text-align: left;
  }

  .chain-body p {
    max-width: none;
    margin-inline: 0;
  }

  .scenario {
    padding: 22px 20px;
  }

  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (max-width: 780px) {
  /* Au doigt, un lien de pied de page haut de 16 px est intouchable. On elargit
     la cible par le remplissage et l'espacement, sans grossir le texte : la
     densite visuelle du pied de page est preservee, seule la zone active
     grandit. Meme raison pour les liens du sommaire d'ancres. */
  .footer-nav a {
    display: inline-block;
    padding: 7px 0;
  }

  .footer-nav ul {
    gap: 2px;
  }

  .toc a {
    padding-top: 11px;
    padding-bottom: 11px;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 0 18px;
  }

  .btn,
  .btn-lg {
    width: 100%;
    justify-content: center;
  }

  .hero-actions {
    flex-direction: column;
  }

  /* Empilement des blocs a pastille sur tres petit ecran.
     Le schema de flux (.chain sans .chain-list) est exclu a dessein : sa
     pastille doit rester A GAUCHE du texte pour que le fil vertical qui relie
     les etapes garde un sens. Seule la variante liste s'empile ici. */
  .chain-list .chain-step,
  .grade,
  .limit-item,
  .callout-key {
    flex-direction: column;
    gap: 14px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
}

/* ---- Mouvement reduit ---- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .btn:hover,
  .card:hover {
    transform: none;
  }
}

/* ---- Impression ---- */

@media print {
  .site-header,
  .toc,
  .cta,
  .hero-actions,
  .nav-toggle {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .card,
  .panel,
  .note,
  .callout,
  .chain-step {
    border-color: #ccc;
    background: #fff;
  }
}
