/* ==========================================================================
   SYNELAB · synelab.css
   La DA commune à toutes les pages de synelab.
   Fond blanc + grain léger, encre presque noire, typo système Apple,
   une couleur d'accent par bloc. Un seul thème, clair. Aucune police à charger.

   Usage :
     <link rel="stylesheet" href="/assets/synelab.css">
     <body class="grain"> ... <div class="page"> ... </div></body>
   Couleur d'un bloc : ajouter .is-orange, .is-blue, .is-green ou .is-neutral
   sur le bloc ; ses composants (tag, step, stat, callout, schéma) suivent.
   Un seul accent par bloc. Le point clé du bloc porte en plus .is-key (plein).
   Citron : uniquement via un .is-lemon ajouté à la main, une fois par page au maximum.
   ========================================================================== */


/* 1. Tokens ---------------------------------------------------------------- */
:root{
  color-scheme: light;

  /* Neutres */
  --bg:      #FFFFFF;   /* fond de toutes les pages */
  --ink:     #0B0B0C;   /* titres et texte */
  --ink-2:   #6E6E73;   /* texte secondaire */
  --ink-3:   #8E8E93;   /* flèches, légendes discrètes */
  --line:    #E5E5EA;   /* filets */
  --line-2:  #C7C7CC;   /* filets appuyés, crochets de schéma */
  --surface: #F5F5F7;   /* bloc neutre, survol */

  /* Accents. plein = signature (logo, pastilles, barres) ; deep = texte sur blanc ou sur teinte ;
     tint = fond de bloc (8 à 14 % de l'accent sur blanc) ;
     solid + on = aplat qui porte du texte (bouton, boîte clé), contraste AA 4,5:1 minimum */
  --orange: #D97757; --orange-deep: #B05030; --orange-tint: #FAEFEB; --orange-solid: #BD5634; --orange-on: #FFFFFF; /* réf. Claude */
  --blue:   #0A84FF; --blue-deep:   #0066CC; --blue-tint:   #E2F0FF; --blue-solid:   #0071E3; --blue-on:   #FFFFFF; /* réf. Mail */
  --green:  #25D366; --green-deep:  #0B7A3B; --green-tint:  #E5FAED; --green-solid:  #25D366; --green-on:  #0B0B0C; /* réf. WhatsApp */
  --lemon:  #D1FE17; --lemon-deep:  #4D5E00; --lemon-tint:  #F9FEE3; --lemon-solid:  #D1FE17; --lemon-on:  #0B0B0C; /* réf. Higgsfield : une touche par page */

  /* Accent courant (orange par défaut) */
  --accent: var(--orange); --accent-deep: var(--orange-deep); --accent-tint: var(--orange-tint);
  --accent-solid: var(--orange-solid); --accent-on: var(--orange-on);

  /* Typo : pile système, rien à télécharger */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;

  /* Formes et espaces */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 22px;
  --pill: 999px;
  --max: 1120px;
  --gutter: 16px;
  --section: clamp(80px, 11vw, 144px);

  /* Grain : bruit SVG (feTurbulence) en points noirs transparents, posé par .grain.
     Résultat mesuré : fond moyen #FCFCFC, variation de 2 à 3 niveaux, jamais sale. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2.2 0 0 0 -0.9'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --grain-opacity: .05;
}
@media (min-width: 768px){ :root{ --gutter: 32px; } }
@media (min-width: 1200px){ :root{ --gutter: 48px; } }

/* Une couleur par bloc */
.is-orange { --accent: var(--orange); --accent-deep: var(--orange-deep); --accent-tint: var(--orange-tint); --accent-solid: var(--orange-solid); --accent-on: var(--orange-on); }
.is-blue   { --accent: var(--blue);   --accent-deep: var(--blue-deep);   --accent-tint: var(--blue-tint);   --accent-solid: var(--blue-solid);   --accent-on: var(--blue-on); }
.is-green  { --accent: var(--green);  --accent-deep: var(--green-deep);  --accent-tint: var(--green-tint);  --accent-solid: var(--green-solid);  --accent-on: var(--green-on); }
.is-lemon  { --accent: var(--lemon);  --accent-deep: var(--lemon-deep);  --accent-tint: var(--lemon-tint);  --accent-solid: var(--lemon-solid);  --accent-on: var(--lemon-on); }
.is-neutral{ --accent: var(--line-2); --accent-deep: var(--ink-2);       --accent-tint: var(--surface);     --accent-solid: var(--ink);          --accent-on: #FFFFFF; }


/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video{ display: block; max-width: 100%; }
p{ margin: 0 0 1em; }
p:last-child{ margin-bottom: 0; }
a{ color: var(--blue-deep); text-decoration: none; }
a:hover{ text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
strong{ font-weight: 600; }
::selection{ background: var(--blue-tint); color: var(--ink); }
:focus-visible{ outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

/* Grain : texture de bruit fixe SOUS le contenu, ne capte aucun clic.
   Il texture le blanc et laisse intacts les aplats, les boutons et tout ce qui se superpose. */
.grain::before{
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--grain);
  background-size: 180px 180px;
  opacity: var(--grain-opacity);
}
.page, main{ position: relative; z-index: 1; }


/* 3. Mise en page ---------------------------------------------------------- */
.page{
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section{ padding-top: var(--section); }
.section-head{ display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-num{ font: 500 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.hr{ height: 1px; border: 0; margin: 0; background: var(--line); }
.grid-2{ display: grid; gap: 40px; }
@media (min-width: 900px){ .grid-2{ grid-template-columns: 1fr 1fr; gap: 64px; } }

/* En-tête et pied de page */
.site-header{
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 68px;
  border-bottom: 1px solid var(--line);
}
.site-header .right{ display: flex; align-items: center; gap: 28px; }
.site-nav{ display: flex; gap: 24px; font-size: 14px; }
.site-nav a{ color: var(--ink-2); }
.site-nav a:hover{ color: var(--ink); text-decoration: none; }
@media (max-width: 720px){ .site-nav{ display: none; } }

.site-footer{
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px;
  margin-top: var(--section);
  padding: 28px 0 48px;
  border-top: 1px solid var(--line);
  font-size: 14px; color: var(--ink-2);
}
.site-footer .domain{ font: 500 12px/1.2 var(--mono); letter-spacing: .02em; color: var(--ink); }


/* 4. Logotype -------------------------------------------------------------- */
/* Le nom en graisse forte, approche légèrement serrée, suivi d'un point orange. */
.logo{
  display: inline-block;
  font-family: var(--font);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
  white-space: nowrap;
}
.logo::after{
  content: "";
  display: inline-block;
  width: .2em; height: .2em;
  margin-left: .07em;
  border-radius: 50%;
  background: var(--orange);
}
a.logo:hover{ text-decoration: none; }
.logo-xl{ font-size: clamp(64px, 15vw, 176px); letter-spacing: -0.04em; }


/* 5. Typographie ----------------------------------------------------------- */
/* SF Pro Display resserre déjà les grands corps : approche négative mesurée, jamais écrasée. */
h1, h2, h3, h4{ margin: 0; font-weight: 600; color: var(--ink); text-wrap: balance; }
h1, .h1{ font-size: clamp(42px, 7.2vw, 84px); line-height: 1.04; letter-spacing: -0.022em; font-weight: 600; }
h2, .h2{ font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -0.016em; }
.h-md  { font-size: clamp(26px, 3vw, 34px); line-height: 1.15; letter-spacing: -0.01em; }
h3, .h3{ font-size: 21px; line-height: 1.25; letter-spacing: -0.005em; }

.lead{
  font-size: clamp(19px, 2vw, 23px);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  max-width: 36em;
  text-wrap: pretty;
}
.muted{ color: var(--ink-2); }
.mono{ font-family: var(--mono); letter-spacing: 0; }
.num{ font-variant-numeric: tabular-nums; }

/* Sur-titre : petit label technique, avec point de couleur en option (.dot) */
.eyebrow{
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 20px;
  font: 500 12px/1.2 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.eyebrow.dot::before{
  content: ""; flex: none;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
}


/* 6. Boutons (pilules) ----------------------------------------------------- */
/* Bouton principal : .btn-ink. .btn-accent sert au point clé, en aplat AA (--accent-solid). */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--bg);
  color: var(--ink);
  font: 600 16px/1 var(--font);
  letter-spacing: -0.012em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:hover{ background: var(--surface); text-decoration: none; }
.btn:active{ transform: scale(.98); }
.btn-accent{ background: var(--accent-solid); border-color: var(--accent-solid); color: var(--accent-on); }
.btn-accent:hover{ background: var(--accent-deep); border-color: var(--accent-deep); color: #FFFFFF; }
.btn-ink{ background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.btn-ink:hover{ background: #2C2C2E; border-color: #2C2C2E; }
.btn-row{ display: flex; flex-wrap: wrap; gap: 12px; }


/* 7. Tag ------------------------------------------------------------------- */
.tag{
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 11px;
  border-radius: var(--pill);
  background: var(--accent-tint);
  color: var(--accent-deep);
  font: 500 12px/1 var(--mono);
  letter-spacing: .02em;
  white-space: nowrap;
}
.tag-line{ background: transparent; border: 1px solid var(--line); color: var(--ink-2); }

/* Pastille de couleur (légende, tableau) */
.key{
  display: inline-block; flex: none;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  vertical-align: 1px;
}
.legend{ display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 14px; color: var(--ink-2); }
.legend span{ display: inline-flex; align-items: center; gap: 8px; }


/* 8. Étapes numérotées ----------------------------------------------------- */
/* <ol class="steps"><li class="is-neutral"><span class="step-meta">..</span><div class="step-body"><h3>..</h3><p>..</p></div></li></ol>
   Numéros en neutre ; l'étape clé seule prend l'accent du bloc : <li class="is-blue is-key">. */
.steps{ list-style: none; margin: 0; padding: 0; counter-reset: step; border-top: 1px solid var(--line); }
.steps > li{
  counter-increment: step;
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-areas: "num meta" "num body";
  column-gap: 18px; row-gap: 8px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.steps > li::before{
  content: counter(step, decimal-leading-zero);
  grid-area: num;
  align-self: start;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent-tint);
  color: var(--accent-deep);
  font: 600 13px/1 var(--mono);
  font-variant-numeric: tabular-nums;
}
.steps > li.is-key::before{ background: var(--accent-solid); color: var(--accent-on); }
.step-meta{ grid-area: meta; align-self: center; font: 500 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.steps > li.is-key .step-meta{ color: var(--accent-deep); }
.step-body{ grid-area: body; }
.step-body h3{ margin-bottom: 6px; }
.step-body p{ color: var(--ink-2); max-width: 40em; }
@media (min-width: 760px){
  .steps > li{
    grid-template-columns: 56px 1fr 180px;
    grid-template-areas: "num body meta";
    column-gap: 24px;
    padding: 32px 0;
  }
  .step-meta{ align-self: start; text-align: right; padding-top: 6px; }
  .step-body h3{ padding-top: 7px; }
}


/* 9. Schéma (conteneur SVG) ------------------------------------------------ */
/* Blanc et grain, rien d'autre derrière. UN accent par schéma, posé sur la figure
   (<figure class="diagram is-blue">) : boîtes en teinte à coins 14 px, trait 1,5 px
   à 55 % de l'accent, flèches grises fines. La boîte clé (<g class="is-key">) seule en plein.
   La boucle et sa pastille reprennent le même accent.
   Deux SVG : .diagram-wide (écran large, dès 1100 px) et .diagram-tall (téléphone,
   viewBox de 340 de large, boîtes de 290). */
.diagram{
  margin: 0;
  padding: clamp(12px, 3vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.diagram svg{ width: 100%; height: auto; overflow: visible; }
.diagram-tall{ display: none; }
@media (max-width: 1099px){
  .diagram-wide{ display: none; }
  .diagram-tall{ display: block; max-width: 400px; margin-inline: auto; }
}
@media (max-width: 599px){ .diagram{ padding: 12px; } }
.diagram figcaption{
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  margin-top: clamp(24px, 4vw, 40px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px; color: var(--ink-2);
}
/* Éléments SVG (spécificité .diagram .x pour passer devant .diagram text) */
.diagram text{ font-family: var(--font); fill: var(--ink); letter-spacing: -0.005em; }
.diagram .d-box{
  fill: var(--accent-tint);
  stroke: var(--accent);
  stroke: color-mix(in srgb, var(--accent) 55%, white);
  stroke-width: 1.5;
}
.diagram .d-label{ font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: .08em; fill: var(--accent-deep); }
.diagram .d-phase{ font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: .08em; fill: var(--ink-2); }
.diagram .d-title{ font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.diagram .d-sub{ font-size: 15px; fill: var(--ink-2); }
.diagram .d-bracket{ fill: none; stroke: var(--line-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.diagram .d-arrow{ fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.diagram .d-loop{ stroke: var(--accent); stroke-dasharray: 3 6; }
.diagram .d-loop-head{ stroke: var(--accent); }
.diagram .d-pill{ fill: var(--accent-tint); }
.diagram .d-pill-text{ font-size: 14px; font-weight: 600; text-anchor: middle; fill: var(--accent-deep); }
/* Boîte clé : aplat AA, textes en couleur « on » */
.diagram .is-key .d-box{ fill: var(--accent-solid); stroke: var(--accent-solid); }
.diagram .is-key text{ fill: var(--accent-on); }
/* Version téléphone : textes un cran plus grands pour rester lisibles une fois réduits */
.diagram-tall .d-title{ font-size: 24px; }
.diagram-tall .d-sub{ font-size: 18px; }
.diagram-tall .d-label{ font-size: 14px; }
.diagram-tall .d-pill-text{ font-size: 15px; }


/* 10. Tableau de chiffres -------------------------------------------------- */
.table-wrap{ overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table{
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 17px;
}
.table th{
  padding: 0 16px 14px 0;
  border-bottom: 1px solid var(--ink);
  font: 500 12px/1.2 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: left;
  color: var(--ink-2);
  white-space: nowrap;
}
.table td{ padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.table th:last-child, .table td:last-child{ padding-right: 0; }
.table .r{ text-align: right; white-space: nowrap; }
/* Cellule avec pastille : ajouter .k sur le td, le texte renvoyé à la ligne reste aligné */
.table td.k{ padding-left: 21px; }
.table td.k .key{ margin: 0 12px 0 -21px; }
.table .sub{ display: block; margin-top: 2px; font-size: 14px; color: var(--ink-2); }
.table tfoot td{ border-bottom: 0; border-top: 1px solid var(--ink); font-weight: 600; }
.table tfoot .r{ color: var(--accent-deep); }

/* Barre empilée (répartition d'un total) : segments en gris, l'accent sur le seul chiffre clé */
.bar{ display: flex; gap: 3px; height: 14px; margin: 0 0 36px; border-radius: var(--pill); overflow: hidden; }
.bar > span{ min-width: 3px; background: var(--accent); }


/* 11. Encadré « à retenir » ----------------------------------------------- */
.callout{
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--r-lg);
  background: var(--accent-tint);
}
.callout .eyebrow{ color: var(--accent-deep); }
.callout .eyebrow::before{ background: var(--accent); }
.callout p:not(.eyebrow){
  max-width: 30em;
  font-size: clamp(22px, 2.7vw, 30px);
  line-height: 1.3;
  letter-spacing: -0.012em;
  font-weight: 500;
  color: var(--ink);
}
.callout strong{ color: var(--accent-deep); font-weight: 600; }


/* 12. Chiffre clé ---------------------------------------------------------- */
/* Chiffres en encre (.is-neutral) ; le chiffre clé seul prend l'accent : <div class="stat is-green is-key"> */
.stats{ display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 32px; }
.stat{ padding: 22px 0 28px; border-top: 1px solid var(--line); }
.stat-label{
  display: flex; align-items: center; gap: 10px;
  font: 500 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
}
.stat-label::before{ content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.stat-value{
  display: block;
  margin: 16px 0 10px;
  font-size: clamp(44px, 5.4vw, 64px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.stat.is-key .stat-value{ color: var(--accent-deep); }
.stat-note{ margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink-2); max-width: 22em; }


/* 13. Pastilles de palette ------------------------------------------------- */
.swatches{ display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 32px 20px; }
.swatch-chip{
  aspect-ratio: 3 / 2;
  border-radius: var(--r);
  background: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(11, 11, 12, .06);
}
/* Version accent : plein en haut, teinte en bas */
.swatch-chip.split{ background: linear-gradient(var(--accent) 0 64%, var(--accent-tint) 64% 100%); }
.swatch-name{ margin-top: 14px; font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.swatch-hex{ margin-top: 2px; font: 500 12px/1.4 var(--mono); color: var(--ink-2); }
.swatch-role{ margin-top: 6px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }


/* 14. Liste de pages ------------------------------------------------------- */
/* Une ligne par page, filet fin, label mono, une seule couleur d'accent par ligne (.is-*). */
.index-list{ list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.index-list a{
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "meta arrow" "title arrow" "desc arrow";
  column-gap: 16px; row-gap: 6px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.index-list a:hover{ text-decoration: none; }
.index-meta{
  grid-area: meta;
  display: flex; align-items: center; gap: 10px;
  font: 500 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
}
.index-meta::before{ content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.index-title{ grid-area: title; font-size: 21px; font-weight: 600; line-height: 1.25; letter-spacing: -0.005em; transition: color .15s ease; }
.index-desc{ grid-area: desc; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.index-arrow{ grid-area: arrow; align-self: center; font-size: 19px; color: var(--ink-3); transition: transform .15s ease, color .15s ease; }
.index-list a:hover .index-title{ color: var(--accent-deep); }
.index-list a:hover .index-arrow{ color: var(--accent-deep); transform: translateX(3px); }
@media (min-width: 760px){
  .index-list a{
    grid-template-columns: 200px 1fr auto;
    grid-template-areas: "meta title arrow" "meta desc arrow";
    column-gap: 24px;
    padding: 28px 0;
  }
  .index-meta{ align-self: start; padding-top: 6px; }
}
