/* ============================================================
   QualityCheck — Site vitrine
   HTML + CSS statiques. Aucun JavaScript.
   Thème clair · Bordeaux.

   Règles de design (inspirées des sites B2B de référence) :
   1. une seule couleur principale (bordeaux) pour boutons et liens ;
   2. pas de dégradés décoratifs, jamais sur le texte ;
   3. des neutres légèrement teintés (gris rosé), ni noir ni blanc purs pour le texte ;
   4. une bande sombre pour rythmer la page (contact + pied de page) ;
   5. le produit au centre : captures cadrées comme des fenêtres d'application.
   ============================================================ */

:root {
  color-scheme: light;

  /* Neutres légèrement teintés */
  --bg:          #ffffff;   /* fond de page            */
  --bg-alt:      #f8f5f5;   /* sections alternées      */
  --bg-deep:     #2a0f1a;   /* bande sombre (contact)  */
  --card:        #ffffff;   /* cartes, tableaux        */
  --chrome:      #f5eff0;   /* barre des fenêtres      */
  --ink:         #1f1216;   /* titres                  */
  --body:        #4a3c40;   /* texte                   */
  --muted:       #7d6d72;   /* texte secondaire        */
  --line:        #ece3e5;   /* bordures                */
  --line-strong: #dccdd1;   /* bordures au survol      */

  /* Couleur principale unique : bordeaux */
  --primary:     #7a1f3d;
  --primary-h:   #962a4d;   /* survol                  */
  --on-primary:  #ffffff;   /* texte sur bouton        */
  --accent:      #7a1f3d;   /* petits libellés         */
  --rgb:         122,31,61;   /* couleur principale en R,G,B (pour les transparences) */
  --float-bg:    rgba(255,255,255,.94);
  --soft:        rgba(var(--rgb),.13);
  --glow:        rgba(var(--rgb),.35);
  --glow-soft:   rgba(var(--rgb),.12);
  --header-bg:   rgba(255,255,255,.86);
  --shadow:      15,23,42;    /* teinte des ombres (R,G,B) */
  --err:         #c62828;     /* erreurs de la démo      */

  /* Couleurs des 5 dimensions (logo, tableau) : du bordeaux foncé au rose poudré */
  --d1: #4d1025;  /* Complétude */
  --d2: #7a1f3d;  /* Conformité */
  --d3: #a33a5c;  /* Cohérence  */
  --d4: #c9667f;  /* Véracité   */
  --d5: #e0a0b0;  /* Unicité    */

  --serif: Georgia, Cambria, "Times New Roman", Times, serif;
  --sans:  "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); font-weight: 700; line-height: 1.18; letter-spacing: -.01em; }

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

.kicker {
  font-family: var(--sans);
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px;
  display: inline-flex; align-items: center; gap: 10px;
}
.kicker::before { content: ""; width: 26px; height: 2px; background: var(--primary); display: inline-block; }

.section-head { max-width: 60ch; margin-bottom: 46px; }
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); margin: 0 0 14px; }
.section-head p { margin: 0; color: var(--muted); font-size: 1.06rem; }

section { padding: 92px 0; }
section[id] { scroll-margin-top: 84px; }  /* les liens d'ancre atterrissent sous l'en-tête collant */
.alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--header-bg); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.wordmark { display: flex; align-items: center; gap: 11px; font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--ink); }
/* Logo : anneau des 5 dimensions (couleurs --d1 → --d5) + coche */
.wordmark .logo { width: 34px; height: 34px; flex: none; overflow: visible; }
.wordmark .seg { stroke-dasharray: 15.92 84.08; }   /* 5 segments de 72° séparés par un petit espace */
.wordmark .seg:nth-child(1) { stroke: var(--d1); }
.wordmark .seg:nth-child(2) { stroke: var(--d2); }
.wordmark .seg:nth-child(3) { stroke: var(--d3); }
.wordmark .seg:nth-child(4) { stroke: var(--d4); }
.wordmark .seg:nth-child(5) { stroke: var(--d5); }
.wordmark .ring { transform-box: view-box; transform-origin: 50% 50%; transition: transform .6s cubic-bezier(.3,1.4,.5,1); }
.wordmark:hover .ring { transform: rotate(72deg); }
.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a { color: var(--body); font-size: .95rem; font-weight: 500; }
.main-nav a:hover { color: var(--ink); }
.main-nav a.btn-nav { color: var(--on-primary); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 600; font-size: 1rem;
  padding: 13px 26px; border-radius: 8px; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 10px 30px -10px var(--glow); }
.btn-primary:hover { background: var(--primary-h); transform: translateY(-2px); }
.btn-nav { background: var(--primary); color: var(--on-primary); padding: 9px 18px; border-radius: 7px; font-size: .9rem; font-weight: 600; }
.btn-nav:hover { background: var(--primary-h); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-h); }

/* ---------- Accueil / Hero ---------- */
.hero { padding: 104px 0 70px; position: relative; overflow: hidden; }
.hero > .wrap { position: relative; z-index: 1; }
/* Fond : grille de données qui défile lentement, fondue sur les bords */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(var(--rgb),.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(var(--rgb),.07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 60% 25%, #000 25%, transparent 75%);
          mask-image: radial-gradient(ellipse 75% 60% at 60% 25%, #000 25%, transparent 75%);
  animation: grid-drift 24s linear infinite;
}
/* Halo lumineux (couleur principale) qui dérive doucement */
.hero::after {
  content: ""; position: absolute; width: 640px; height: 640px; top: -260px; right: -140px; pointer-events: none;
  border-radius: 50%; background: radial-gradient(circle, rgba(var(--rgb),.22), transparent 65%);
  filter: blur(30px); animation: orb 16s ease-in-out infinite alternate;
}
.hero-inner { max-width: 24ch; }
.hero .tag {
  font-family: var(--sans); font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  font-size: .8rem; color: var(--accent); margin-bottom: 22px; display: block;
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); margin: 0 0 26px; max-width: 16ch; }
.hero h1 .grad { color: var(--primary); }   /* couleur unie, sans dégradé */
.hero .lead { font-family: var(--sans); font-size: 1.24rem; color: var(--body); max-width: 54ch; margin: 0 0 34px; }
.hero .actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hero .actions .note { color: var(--muted); font-size: .92rem; }

/* ---------- Captures présentées comme des fenêtres d'application ---------- */
.hero-figure, .shot { background: var(--card); border: 1px solid var(--line-strong); overflow: hidden; }
.hero-figure::before, .shot::before {
  content: ""; display: block; height: 30px;
  border-bottom: 1px solid var(--line);
  /* trois pastilles neutres, comme une barre de fenêtre */
  background:
    radial-gradient(circle at 18px 50%, var(--line-strong) 0 4.5px, transparent 5px),
    radial-gradient(circle at 34px 50%, var(--line-strong) 0 4.5px, transparent 5px),
    radial-gradient(circle at 50px 50%, var(--line-strong) 0 4.5px, transparent 5px),
    var(--chrome);
}
.hero-visual { position: relative; margin-top: 66px; perspective: 1600px; }
.hero-figure {
  margin: 0; border-radius: 14px; position: relative; transform-origin: 50% 0;
  box-shadow: 0 40px 120px -40px var(--glow), 0 30px 60px -30px rgba(var(--shadow),.35);
}

/* ---------- Problème ---------- */
.problem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.problem-grid .lead-para { font-size: 1.16rem; color: var(--ink); font-family: var(--serif); line-height: 1.55; }
.problem-grid p { margin: 0 0 18px; }
.pill-list { list-style: none; padding: 0; margin: 0; }
.pill-list li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pill-list li:last-child { border-bottom: none; }
.pill-list .mark {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 800; font-size: .85rem; margin-top: 2px;
}
.pill-list span.txt { color: var(--body); }

/* ---------- Fonctionnalités ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 32px 28px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -24px rgba(var(--shadow),.18); border-color: var(--line-strong); }
.card .icon {
  width: 50px; height: 50px; border-radius: 12px; margin-bottom: 20px;
  background: var(--soft); color: var(--accent); display: grid; place-items: center;
}
.card .icon svg { width: 25px; height: 25px; }
.card h3 { font-size: 1.28rem; margin: 0 0 10px; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; font-family: var(--sans); }
.card .idx { font-family: var(--sans); font-size: .8rem; font-weight: 700; color: var(--accent); letter-spacing: .1em; }

/* ---------- Comment ça marche ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; position: relative; }
/* Ligne reliant le centre du 1er cercle au centre du 3e (3 colonnes, 34px d'écart) */
.steps { --span: calc(2 * ((100% - 68px) / 3 + 34px)); }
.steps::before {
  content: ""; position: absolute; top: 33px; left: 33px; width: var(--span); height: 2px;
  background: var(--line-strong); z-index: 0;
}
.step { position: relative; z-index: 1; text-align: left; }
.step .num-wrap {
  background: var(--card); border: 2px solid var(--line-strong); border-radius: 50%;
  width: 66px; height: 66px; display: grid; place-items: center; margin-bottom: 22px;
}
.step .num { font-family: var(--serif); font-size: 1.7rem; font-weight: 700; color: var(--accent); line-height: 1; }
.step h3 { font-size: 1.24rem; margin: 0 0 10px; }
.step p { margin: 0; color: var(--muted); font-family: var(--sans); font-size: .98rem; }
.step .label { font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 6px; }

/* ---------- Types de contrôles ---------- */
.intro-line { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); max-width: 65ch; margin: 0 0 40px; line-height: 1.5; }
.type-table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.table-scroll { overflow-x: auto; border-radius: 14px; }
.type-table th, .type-table td { text-align: left; padding: 18px 22px; border-bottom: 1px solid var(--line); font-family: var(--sans); vertical-align: top; }
.type-table thead th { background: var(--bg-alt); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.type-table tbody tr:last-child td { border-bottom: none; }
.type-table td.dim { white-space: nowrap; font-weight: 700; color: var(--ink); font-size: 1.02rem; }
.type-table td.dim .dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 11px; vertical-align: middle; }
.type-table td.q { color: var(--body); font-style: italic; }
.type-table td.desc { color: var(--muted); }
.type-table .n { color: var(--accent); font-weight: 700; }
.type-table tbody tr { min-width: 0; }
.type-table { min-width: 720px; }

/* ---------- Captures d'écran ---------- */
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.shot { border-radius: 12px; box-shadow: 0 24px 50px -28px rgba(var(--shadow),.25); margin: 0; }
/* recadrage uniforme : toutes les captures ont le même format, calées en haut à gauche */
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.shot figcaption { padding: 16px 20px; font-family: var(--sans); font-size: .94rem; color: var(--body); border-top: 1px solid var(--line); }
.shot figcaption b { color: var(--ink); }

/* ---------- Contact : bande contrastée pleine largeur ---------- */
/* Bande sombre : on inverse les couleurs pour que texte et bouton restent lisibles */
#contact, .site-footer {
  --ink: #ffffff; --body: rgba(255,255,255,.82); --muted: rgba(255,255,255,.62);
  --line: rgba(255,255,255,.12); --line-strong: rgba(255,255,255,.22);
  --primary: #ffffff; --primary-h: #f5eff0; --on-primary: var(--bg-deep); --glow: rgba(255,255,255,.18);
  --accent: #e0a0b0;
}
#contact { background: var(--bg-deep); border-top: 1px solid var(--line); padding: 104px 0; position: relative; overflow: hidden; }
/* L'anneau du logo tourne lentement derrière le titre */
#contact::before {
  content: ""; position: absolute; width: 620px; height: 620px; left: 50%; top: 50%; margin: -310px 0 0 -310px;
  background: url("anneau.svg") center / contain no-repeat; opacity: .07; pointer-events: none;
  animation: ring-spin 60s linear infinite;
}
.contact-card { text-align: center; max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }
.contact-card h2 { font-size: clamp(2rem, 3.4vw, 2.8rem); margin: 0 0 16px; }
.contact-card p { max-width: 52ch; margin: 0 auto 32px; color: var(--muted); font-family: var(--sans); font-size: 1.08rem; }
.contact-card .placeholder-note { font-size: .9rem; color: var(--muted); margin-top: 22px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-deep); border-top: 1px solid var(--line); padding: 32px 0; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; font-family: var(--sans); font-size: .88rem; color: var(--muted); }

/* Texte lu par les lecteurs d'écran uniquement */
.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; }

/* ---------- Accueil : phrase aux 5 dimensions qui défilent ---------- */
.rotator { font-family: var(--serif); font-size: clamp(1.35rem, 2.6vw, 1.9rem); color: var(--ink); margin: -8px 0 22px; line-height: 1.3; }
.rotator .words { display: inline-block; height: 1.3em; overflow: hidden; vertical-align: bottom; }
.rotator .list { display: flex; flex-direction: column; animation: words 12.5s cubic-bezier(.7,0,.3,1) infinite; }
.rotator .list span { display: block; height: 1.3em; font-style: italic; }

/* ---------- Accueil : cartes flottantes autour de la capture ---------- */
.float {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 12px; font-family: var(--sans); font-size: .9rem; line-height: 1.35;
  background: var(--float-bg); border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px); box-shadow: 0 20px 40px -18px rgba(var(--shadow),.3);
}
.float b { display: block; color: var(--ink); font-weight: 600; }
.float small { display: block; color: var(--muted); font-size: .8rem; }
.f-ico { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; }
.f-ico.err { background: rgba(198,40,40,.1); color: var(--err); }
.f-ico.ok  { background: var(--soft); color: var(--accent); }
.f-ring { width: 32px; height: 32px; flex: none; animation: ring-spin 12s linear infinite; }
.f1 { left: -34px; top: 26%; }
.f2 { right: -34px; top: 10%; }
.f3 { right: 9%; bottom: -24px; }

/* ---------- Bandeau défilant des types de contrôles ---------- */
.marquee-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-alt); padding: 26px 0 30px; }
.marquee-label { text-align: center; margin: 0 0 16px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.marquee { overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee .track { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee ul { display: flex; gap: 14px; margin: 0; padding: 0 14px 0 0; list-style: none; }
.marquee li {
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card);
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace; font-size: .85rem; color: var(--body);
}
.marquee li i { width: 8px; height: 8px; border-radius: 50%; }

/* ---------- Chiffres clés (le nombre compte jusqu'à sa valeur) ---------- */
@property --n { syntax: "<integer>"; inherits: false; initial-value: 0; }
.stats { padding: 70px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.stat { border-left: 2px solid var(--line-strong); padding-left: 22px; }
.stat .count { font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 700; color: var(--ink); line-height: 1; counter-reset: n var(--n); }
.stat .count::before { content: counter(n); }
.stat .count.plus::after { content: "+"; color: var(--primary); }
.stat p { margin: 10px 0 0; color: var(--muted); font-size: .95rem; line-height: 1.5; }

/* ---------- Démo animée : un contrôle en direct ---------- */
@property --on { syntax: "<number>"; inherits: true; initial-value: 0; }
#demo { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.demo { display: grid; grid-template-columns: 1.35fr 1fr; gap: 24px; align-items: stretch; }
.demo-panel { background: var(--card); border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 50px -28px rgba(var(--shadow),.25); display: flex; flex-direction: column; }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 16px; background: var(--chrome); border-bottom: 1px solid var(--line); font-size: .85rem; }
.demo-bar .file { color: var(--ink); font-weight: 600; }
.demo-bar .file::before { content: "▦"; color: var(--primary); margin-right: 8px; }
.status { display: grid; font-size: .8rem; font-weight: 600; animation: t6 12s linear infinite; }
.status > span { grid-area: 1 / 1; text-align: right; }
.status .run  { color: var(--muted); opacity: calc(1 - var(--on)); }
.status .done { color: var(--accent); opacity: var(--on); }

.sheet { font-family: Consolas, "Cascadia Mono", "Courier New", monospace; font-size: .85rem; }
.sheet .row { display: grid; grid-template-columns: 58px 1fr 1.3fr 58px 70px 70px; height: 42px; align-items: center; border-bottom: 1px solid var(--line); }
.sheet .row > span { padding: 0 12px; height: 100%; display: flex; align-items: center; white-space: nowrap; overflow: hidden; }
.sheet .row > span:first-child { color: var(--muted); }
.sheet .head { background: var(--bg-alt); color: var(--muted); font-family: var(--sans); font-size: .72rem; font-weight: 700; letter-spacing: .06em; }
.sheet .rows { position: relative; }
.sheet .rows .row:last-child { border-bottom: none; }
/* Barre de balayage qui descend ligne par ligne */
.scan {
  position: absolute; left: 0; right: 0; top: 0; height: 42px; pointer-events: none; z-index: 2;
  background: rgba(var(--rgb),.12); border-bottom: 2px solid var(--primary);
  box-shadow: 0 6px 24px -6px var(--glow); animation: scan 12s linear infinite;
}
/* Cellule en erreur : s'allume quand le balayage passe dessus */
.cell {
  color: color-mix(in srgb, var(--err) calc(var(--on) * 100%), var(--body));
  background: rgba(198,40,40, calc(var(--on) * .08));
  box-shadow: inset 0 0 0 calc(var(--on) * 2px) var(--err);
  font-weight: 700;
}
.cell.t1, .log .t1 { animation: t1 12s linear infinite; }
.cell.t2, .log .t2 { animation: t2 12s linear infinite; }
.cell.t3, .log .t3 { animation: t3 12s linear infinite; }
.cell.t4, .log .t4 { animation: t4 12s linear infinite; }
.cell.t5, .log .t5 { animation: t5 12s linear infinite; }

.log { list-style: none; margin: 0; padding: 14px; display: grid; gap: 10px; flex: 1; align-content: start; }
.log li {
  opacity: var(--on); translate: calc((1 - var(--on)) * 18px) 0;
  padding: 10px 12px 10px 14px; border-radius: 9px; background: var(--bg-alt); border-left: 3px solid var(--c);
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace; font-size: .8rem; color: var(--body); line-height: 1.45;
}
.log li b { display: block; font-family: var(--sans); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c); margin-bottom: 2px; }
.summary {
  margin: 0 14px 14px; padding: 14px 16px; border-radius: 10px; background: var(--soft); border: 1px solid rgba(var(--rgb),.35);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
  animation: t6 12s linear infinite; opacity: var(--on); scale: calc(.96 + var(--on) * .04);
}
.summary strong { color: var(--ink); font-size: 1.05rem; }
.summary span { color: var(--muted); font-size: .88rem; }
.demo-note { margin: 18px 0 0; font-size: .85rem; color: var(--muted); font-style: italic; }

/* ---------- Cartes : lumière qui fait le tour de la bordure au survol ---------- */
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.card { position: relative; }
.card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--a), transparent 0 62%, var(--primary-h) 80%, transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s ease; animation: border-spin 3.2s linear infinite;
}
.card:hover::before { opacity: 1; }

/* ---------- Boutons : reflet au survol, halo qui respire sur l'accueil ---------- */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent); transform: skewX(-20deg);
}
.btn-primary:hover::after { animation: shine .8s ease; }
.hero .btn-primary { animation: breathe 3s 2s ease-in-out infinite; }

/* ---------- Étapes : un point lumineux parcourt les 3 étapes ---------- */
.steps::after {
  content: ""; position: absolute; top: 29px; left: 33px; width: 10px; height: 10px; margin-left: -5px; z-index: 0;
  border-radius: 50%; background: var(--primary-h); box-shadow: 0 0 14px 2px var(--primary);
  animation: travel 4.5s linear infinite;
}
.step .num-wrap { position: relative; }
.step .num-wrap::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--primary);
  opacity: 0; animation: ring-pulse 4.5s ease-out infinite; pointer-events: none;
}
.step:nth-child(2) .num-wrap::after { animation-delay: 2.02s; }
.step:nth-child(3) .num-wrap::after { animation-delay: 4.05s; }

/* ---------- Tableau des dimensions : pastilles qui pulsent ---------- */
.type-table td.dim .dot { animation: dot-pulse 2.6s ease-out infinite; }
.type-table tbody tr:nth-child(2) .dot { animation-delay: .5s; }
.type-table tbody tr:nth-child(3) .dot { animation-delay: 1s; }
.type-table tbody tr:nth-child(4) .dot { animation-delay: 1.5s; }
.type-table tbody tr:nth-child(5) .dot { animation-delay: 2s; }

/* ============================================================
   Animations (CSS uniquement)
   - au chargement : logo qui se dessine, accueil qui apparaît
   - au défilement : les blocs montent en fondu (scroll-driven animations ;
     sur un navigateur qui ne les gère pas, tout reste simplement visible)
   On anime translate / scale (et non transform) pour ne pas écraser
   les effets de survol existants.
   ============================================================ */
@keyframes rise   { from { opacity: 0; translate: 0 34px; } to { opacity: 1; translate: 0 0; } }
@keyframes zoomin { from { opacity: 0; scale: .94; translate: 0 30px; } to { opacity: 1; scale: 1; translate: 0 0; } }
@keyframes pop    { from { opacity: 0; scale: .5; } 70% { scale: 1.08; } to { opacity: 1; scale: 1; } }
@keyframes draw-seg  { from { stroke-dasharray: 0 100; } to { stroke-dasharray: 15.92 84.08; } }
@keyframes draw-tick { from { stroke-dasharray: 0 1; } to { stroke-dasharray: 1 0; } }
@keyframes line-grow { from { scale: 0 1; } to { scale: 1 1; } }
@keyframes header-shadow { to { box-shadow: 0 10px 30px -14px rgba(var(--shadow),.18); } }
@keyframes progress { from { scale: 0 1; } to { scale: 1 1; } }

/* Accueil */
@keyframes grid-drift { to { background-position: 56px 56px; } }
@keyframes orb { from { translate: 0 0; } to { translate: -180px 120px; } }
@keyframes ring-spin { to { rotate: 360deg; } }
@keyframes float-in { from { opacity: 0; scale: .85; } to { opacity: 1; scale: 1; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes tilt { from { transform: rotateX(18deg) scale(.96); } to { transform: none; } }
/* 5 dimensions : chaque mot reste 2 s, puis glisse vers le suivant */
@keyframes words {
  0%, 16%   { translate: 0 0; }
  20%, 36%  { translate: 0 -1.3em; }
  40%, 56%  { translate: 0 -2.6em; }
  60%, 76%  { translate: 0 -3.9em; }
  80%, 96%  { translate: 0 -5.2em; }
  100%      { translate: 0 -6.5em; }
}
@keyframes marquee { to { translate: -50% 0; } }
@keyframes count { from { --n: 0; } }

/* Démo : cycle de 12 s — balayage des 7 lignes (0 → 58 %), résultat, puis remise à zéro */
@keyframes scan {
  0%        { translate: 0 0;     opacity: 0; }
  3%        { opacity: 1; }
  58%       { translate: 0 252px; opacity: 1; }
  62%, 100% { translate: 0 294px; opacity: 0; }
}
@keyframes t1 { 0%, 18.3% { --on: 0; } 19.8%, 90% { --on: 1; } 93%, 100% { --on: 0; } }
@keyframes t2 { 0%, 28%   { --on: 0; } 29.5%, 90% { --on: 1; } 93%, 100% { --on: 0; } }
@keyframes t3 { 0%, 37.7% { --on: 0; } 39.2%, 90% { --on: 1; } 93%, 100% { --on: 0; } }
@keyframes t4 { 0%, 47.3% { --on: 0; } 48.8%, 90% { --on: 1; } 93%, 100% { --on: 0; } }
@keyframes t5 { 0%, 57%   { --on: 0; } 58.5%, 90% { --on: 1; } 93%, 100% { --on: 0; } }
@keyframes t6 { 0%, 62%   { --on: 0; } 65%, 90%   { --on: 1; } 93%, 100% { --on: 0; } }

/* Survols et détails */
@keyframes border-spin { to { --a: 360deg; } }
@keyframes shine { to { left: 130%; } }
@keyframes breathe { 0%, 100% { box-shadow: 0 10px 30px -10px var(--glow); } 50% { box-shadow: 0 10px 44px -6px var(--glow), 0 0 0 6px rgba(var(--rgb),.10); } }
@keyframes travel {
  0%   { left: 33px; opacity: 0; }
  5%   { opacity: 1; }
  90%  { left: calc(33px + var(--span)); opacity: 1; }
  100% { left: calc(33px + var(--span)); opacity: 0; }
}
@keyframes ring-pulse { 0% { opacity: .9; scale: 1; } 35%, 100% { opacity: 0; scale: 1.55; } }
@keyframes dot-pulse { 0% { box-shadow: 0 0 0 0 rgba(var(--rgb),.45); } 70%, 100% { box-shadow: 0 0 0 8px rgba(var(--rgb),0); } }

/* Logo : les 5 dimensions se dessinent l'une après l'autre, puis la coche */
.wordmark .seg { animation: draw-seg .5s cubic-bezier(.6,0,.3,1) both; }
.wordmark .seg:nth-child(2) { animation-delay: .12s; }
.wordmark .seg:nth-child(3) { animation-delay: .24s; }
.wordmark .seg:nth-child(4) { animation-delay: .36s; }
.wordmark .seg:nth-child(5) { animation-delay: .48s; }
.wordmark .tick { animation: draw-tick .45s .75s cubic-bezier(.6,0,.3,1) both; }

/* Accueil : apparition en cascade */
.hero .tag     { animation: rise .7s .10s cubic-bezier(.2,.7,.2,1) both; }
.hero h1       { animation: rise .8s .22s cubic-bezier(.2,.7,.2,1) both; }
.hero .lead    { animation: rise .8s .36s cubic-bezier(.2,.7,.2,1) both; }
.hero .actions { animation: rise .8s .50s cubic-bezier(.2,.7,.2,1) both; }
.rotator      { animation: rise .8s .30s cubic-bezier(.2,.7,.2,1) both; }
.hero-figure   { animation: zoomin 1s .65s cubic-bezier(.2,.7,.2,1) both; }
.float { animation: float-in .7s cubic-bezier(.2,.9,.3,1.2) both, bob 6s ease-in-out infinite; }
.f1 { animation-delay: 1.3s, 1.3s; }
.f2 { animation-delay: 1.6s, 2.6s; }
.f3 { animation-delay: 1.9s, 3.9s; }

/* Survols */
.card .icon { transition: transform .3s cubic-bezier(.3,1.5,.5,1); }
.card:hover .icon { transform: rotate(-8deg) scale(1.1); }
.shot { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.shot:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: 0 30px 70px -30px var(--glow); }
.type-table tbody tr { transition: background .2s ease; }
.type-table tbody tr:hover { background: var(--bg-alt); }

/* En-tête : ombre + barre de progression de lecture au défilement */
@supports (animation-timeline: scroll()) {
  .site-header { animation: header-shadow linear both; animation-timeline: scroll(); animation-range: 0 140px; }
  .site-header::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
    background: var(--primary); transform-origin: 0 50%;
    animation: progress linear both; animation-timeline: scroll();
  }
}

/* Apparition des blocs au défilement */
@supports (animation-timeline: view()) {
  .section-head, .intro-line, .problem-grid > div, .pill-list li,
  .card, .step, .type-table tbody tr, .shot, .contact-card {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 5% entry 65%;
  }
  .shot, .contact-card { animation-name: zoomin; }
  .step .num-wrap { animation: pop linear both; animation-timeline: view(); animation-range: entry 20% entry 80%; }
  .steps::before { transform-origin: 0 50%; animation: line-grow linear both; animation-timeline: view(); animation-range: entry 30% cover 45%; }

  /* Léger décalage entre les éléments d'une même rangée */
  .card:nth-child(3n+2), .step:nth-child(2), .shot:nth-child(2n), .pill-list li:nth-child(2),
  .type-table tbody tr:nth-child(2) { animation-range: entry 12% entry 72%; }
  .card:nth-child(3n+3), .step:nth-child(3), .pill-list li:nth-child(3),
  .type-table tbody tr:nth-child(3) { animation-range: entry 19% entry 79%; }
  .pill-list li:nth-child(4), .type-table tbody tr:nth-child(4) { animation-range: entry 26% entry 86%; }
  .type-table tbody tr:nth-child(5) { animation-range: entry 33% entry 93%; }

  /* Capture de l'accueil : inclinée en 3D, elle se redresse quand on défile */
  .hero-figure {
    animation: zoomin 1s .65s cubic-bezier(.2,.7,.2,1) both, tilt linear both;
    animation-timeline: auto, view();
    animation-range: normal, entry 0% cover 45%;
  }
  /* Chiffres clés : comptent de 0 jusqu'à leur valeur quand ils apparaissent */
  .stat { animation: rise linear both; animation-timeline: view(); animation-range: entry 5% entry 65%; }
  .stat .count { animation: count linear both; animation-timeline: view(); animation-range: entry 10% cover 45%; }
  .stat:nth-child(2) { animation-range: entry 12% entry 72%; }
  .stat:nth-child(3) { animation-range: entry 19% entry 79%; }
  .stat:nth-child(4) { animation-range: entry 26% entry 86%; }
  /* Démo : les deux panneaux arrivent l'un après l'autre */
  .demo-panel { animation: zoomin linear both; animation-timeline: view(); animation-range: entry 5% entry 60%; }
  .demo-panel + .demo-panel { animation-range: entry 15% entry 70%; }
  /* Petit trait devant les sur-titres : se dessine */
  .kicker::before { transform-origin: 0 50%; animation: line-grow linear both; animation-timeline: view(); animation-range: entry 20% entry 80%; }
}

/* Respect du réglage « réduire les animations » du système */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  /* sans animation, la démo affiche directement son résultat final */
  .cell, .log li, .summary, .status { --on: 1; }
  .scan, .steps::after { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .problem-grid { grid-template-columns: 1fr; gap: 34px; }
  /* .feature-grid : on garde 3 colonnes jusqu'a 620px (plus d'etape a 2 colonnes) */
  .steps { grid-template-columns: 1fr; gap: 40px; }
  .steps::before, .steps::after { display: none; }
  .shots { grid-template-columns: 1fr; }
  .float { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 34px 26px; }
  .demo { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .main-nav a:not(.btn-nav) { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  section { padding: 66px 0; }
  .section-head { margin-bottom: 32px; }

  /* Accueil */
  .hero { padding: 62px 0 34px; }
  .hero h1 { font-size: clamp(2.3rem, 11vw, 3rem); }
  .hero .lead { font-size: 1.08rem; }
  .hero-figure { margin-top: 40px; }
  .hero .actions { width: 100%; }
  .hero .actions .btn { width: 100%; justify-content: center; }

  /* Contact */
  #contact { padding: 72px 0; }

  /* Démo : on retire la colonne NAME pour tenir sur un téléphone */
  .sheet .row { grid-template-columns: 48px 1fr 44px 58px 58px; font-size: .78rem; }
  .sheet .c-name { display: none !important; }
  .sheet .row > span { padding: 0 8px; }
  .stats { padding: 54px 0; }

  /* Tableau des contrôles : cartes empilées au lieu du défilement horizontal */
  .table-scroll { overflow: visible; }
  .type-table { min-width: 0; border: none; background: transparent; }
  .type-table thead { display: none; }
  .type-table,
  .type-table tbody,
  .type-table tr,
  .type-table td { display: block; width: 100%; }
  .type-table tr {
    border: 1px solid var(--line); border-radius: 12px;
    margin-bottom: 16px; background: var(--card); overflow: hidden;
  }
  .type-table td { padding: 13px 18px; border-bottom: 1px solid var(--line); }
  .type-table td:last-child { border-bottom: none; }
  .type-table td.dim { background: var(--bg-alt); font-size: 1.1rem; white-space: normal; }
  .type-table td.q::before,
  .type-table td.desc::before {
    content: attr(data-label);
    display: block; font-family: var(--sans); font-style: normal;
    font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 4px;
  }
}
