/* ==========================================================================
   POIETIS BIOSYSTEMS — SOCLE / DESIGN SYSTEM
   Source de vérité unique. Charte : brand/poietis-style-brochure.html
   Stack : CSS natif (tokens + composants) + Tailwind v4 (utilitaires) + vanilla JS.
   Light-mode locked. Tokens prêts pour un swap dark futur.
   --------------------------------------------------------------------------
   Sommaire :
   1. Tokens (:root)        7. Pills
   2. Base + reset          8. Navigation (site-header)
   3. Grain papier          9. Footer (site-footer)
   4. Typographie          10. Bento (grid + cards)
   5. Layout / sections    11. Stats / Pillars / Modules / Publications
   6. Boutons              12. Motion (reveal) + reduced-motion
   ========================================================================== */

/* 1. ----------------------------------------------------------------- TOKENS
   NB: ces valeurs sont aussi mirrorées dans le bloc <style type="text/tailwindcss">
   @theme de chaque page (pour les utilitaires Tailwind bg-teal, text-ink, etc.).
   Garder les deux synchronisés. */
:root {
  /* Couleurs charte */
  --teal:       #009D80;
  --blue-mid:   #0E5A8C;
  --blue-deep:  #1C53B7;
  --mint:       #7FD9B5;

  /* Neutres bleutés — jamais de noir pur ni de blanc pur */
  --ink:        #16202E;
  --ink-soft:   #46566A;
  --ink-faint:  #6B7A8D;
  --paper:      #F6F8F9;
  --paper-2:    #EEF2F4;   /* alternance de sections */
  --line:       #E3E8EC;
  --white:      #FFFFFF;

  /* Dégradé signature — réservé conversion + accents */
  --grad: linear-gradient(120deg, var(--teal) 0%, var(--blue-mid) 55%, var(--blue-deep) 100%);
  --grad-soft: linear-gradient(135deg, rgba(0,157,128,.10), rgba(28,83,183,.10));

  /* Typo */
  --font: 'Manrope', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Rayons — règle figée : pill (interactif) / 20px (cards) / 12px (small) */
  --r-pill: 999px;
  --r:      20px;
  --r-sm:   12px;

  /* Ombres teintées ink (jamais noir pur) */
  --shadow-sm: 0 1px 2px rgba(22,32,46,.04);
  --shadow:    0 1px 2px rgba(22,32,46,.04), 0 12px 32px -12px rgba(22,32,46,.10);
  --shadow-lg: 0 1px 2px rgba(22,32,46,.04), 0 28px 60px -20px rgba(22,32,46,.18);
  --shadow-brand: 0 12px 28px -10px rgba(28,83,183,.45);

  /* Rythme vertical */
  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 40px);

  /* Easing premium */
  --ease: cubic-bezier(.16, 1, .3, 1);

  /* Z-index — échelle documentée, pas de spam */
  --z-grain: 1;
  --z-header: 50;
  --z-overlay: 60;
}

/* 2. ------------------------------------------------------------------- BASE */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  font-size: 16px;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--teal); color: #fff; }

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

/* 3. ----------------------------------------------------------- GRAIN PAPIER
   Fixe, pointer-events:none — jamais sur un conteneur qui scrolle (perf GPU). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: .03;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* 4. ------------------------------------------------------------ TYPOGRAPHIE */
.display {
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.0;
  text-transform: uppercase;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  margin: 0;
}
.h1 { font-weight: 800; letter-spacing: -.02em; line-height: 1.05; font-size: clamp(2rem, 4.2vw, 3.2rem); margin: 0; }
.h2 { font-weight: 800; letter-spacing: -.015em; line-height: 1.1;  font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0; }
.h3 { font-weight: 700; letter-spacing: -.01em;  line-height: 1.2;  font-size: clamp(1.15rem, 2vw, 1.4rem); margin: 0; }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--ink-soft);
  font-weight: 500;
  line-height: 1.5;
  max-width: 60ch;
  margin: 0;
}
.body { color: var(--ink-soft); font-size: 1rem; line-height: 1.6; max-width: 65ch; margin: 0; }
.small { font-size: .82rem; color: var(--ink-faint); }
.ital { font-style: italic; }

/* Eyebrow — petit label maj. À utiliser avec parcimonie (max ~1 / 3 sections). */
.eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 .9rem;
}

/* Texte au dégradé signature — réservé chiffres / 1 accent par vue */
.text-grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 5. -------------------------------------------------------- LAYOUT/SECTIONS */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-wide { max-width: 1440px; }

.section { padding-block: clamp(56px, 9vw, 120px); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.section--alt { background: var(--paper-2); }
.section--ink { background: var(--ink); color: var(--white); }

/* En-tête de section : empilé vertical (jamais split-header gauche/droite). */
.sec-head { max-width: 62ch; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-head .lead { margin-top: .8rem; }
.sec-head--center { margin-inline: auto; text-align: center; }

/* 6. ----------------------------------------------------------------- MOONS
   Signature « cellules / gouttelettes » — 100% CSS, 1 lune max par carte. */
.moon {
  position: absolute;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 120% at 28% 26%, var(--mint) 0%, rgba(127,217,181,0) 42%),
    radial-gradient(130% 130% at 72% 78%, var(--blue-deep) 0%, rgba(28,83,183,0) 55%),
    conic-gradient(from 210deg at 50% 50%, var(--teal), var(--blue-mid), var(--blue-deep), var(--teal));
  opacity: .9;
}
.moon--blur { filter: blur(18px); }
.moon--soft { opacity: .5; }

/* 7. --------------------------------------------------------------- BOUTONS */
.btn {
  --_pad-y: 14px;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: inherit;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .01em;
  line-height: 1;
  padding: var(--_pad-y) 26px;
  border-radius: var(--r-pill);
  border: 0;
  cursor: pointer;
  white-space: nowrap;               /* CTA toujours sur une ligne */
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }   /* feedback tactile */

/* Primaire = dégradé signature. Réservé à la conversion. Contraste AA (texte blanc). */
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -10px rgba(28,83,183,.55); }

/* Secondaire discret. */
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); padding-block: calc(var(--_pad-y) - 1.5px); }
.btn-ghost:hover { background: var(--ink); color: #fff; }

/* Sur fond ink */
.section--ink .btn-ghost,
.site-footer .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.section--ink .btn-ghost:hover,
.site-footer .btn-ghost:hover { background: #fff; color: var(--ink); }

.btn-link { color: var(--teal); font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center; gap: .35rem; }
.btn-link .arrow { transition: transform .2s var(--ease); }
.btn-link:hover .arrow { transform: translateX(3px); }

/* 8. ----------------------------------------------------------------- PILLS */
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  border: 1.5px solid var(--ink);
  border-radius: var(--r-pill);
  padding: 8px 16px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
}
.pill--soft { border-color: var(--line); background: var(--white); color: var(--ink-soft); letter-spacing: .04em; }

/* 9. ------------------------------------------------------- NAV / SITE-HEADER */
site-header { display: block; }
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--paper) 92%, transparent); }

.nav {
  height: 68px;                      /* cap 80px desktop */
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__logo { display: inline-flex; align-items: center; height: 40px; flex: 0 0 auto; }
.nav__logo img { height: 40px; width: auto; }

.nav__links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav__link {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  transition: color .18s var(--ease), background-color .18s var(--ease);
  white-space: nowrap;
}
.nav__link:hover { color: var(--ink); background: var(--paper-2); }
.nav__link.is-active { color: var(--ink); }

.nav__spacer { flex: 1 1 auto; }
.nav__cta { flex: 0 0 auto; --_pad-y: 10px; padding-left: 20px; padding-right: 20px; font-size: .85rem; }

.nav__burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer;
  border-radius: var(--r-sm);
}
.nav__burger span { position: relative; width: 20px; height: 2px; background: var(--ink); display: block; transition: transform .25s var(--ease), opacity .2s var(--ease); }
.nav__burger span::before, .nav__burger span::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink); transition: transform .25s var(--ease); }
.nav__burger span::before { top: -6px; }
.nav__burger span::after { top: 6px; }
.site-header.is-open .nav__burger span { background: transparent; }
.site-header.is-open .nav__burger span::before { transform: translateY(6px) rotate(45deg); }
.site-header.is-open .nav__burger span::after { transform: translateY(-6px) rotate(-45deg); }

/* Panneau mobile */
.nav__mobile {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px var(--gutter) 24px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.nav__mobile a { padding: 13px 12px; font-weight: 600; color: var(--ink); border-radius: var(--r-sm); }
.nav__mobile a:hover { background: var(--paper-2); }
.nav__mobile .btn { margin-top: 12px; justify-content: center; }
.site-header.is-open .nav__mobile { display: flex; }

@media (max-width: 1024px) {
  .nav__links { display: none; }
  .nav__burger { display: inline-flex; }
  .nav__cta { display: none; }
}

/* 10. ------------------------------------------------------- FOOTER */
.site-footer { background: var(--ink); color: rgba(255,255,255,.72); }
.site-footer a { color: rgba(255,255,255,.72); transition: color .18s var(--ease); }
.site-footer a:hover { color: #fff; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
  padding-block: clamp(48px, 7vw, 80px);
}
.footer__brand img { height: 44px; margin-bottom: 18px; }
.footer__brand p { max-width: 34ch; font-size: .9rem; line-height: 1.6; }
.footer__col h4 { color: #fff; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 16px; font-weight: 700; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer__col a { font-size: .92rem; }
.footer__contact { display: grid; gap: 8px; font-size: .92rem; margin-top: 18px; }
.footer__contact strong { color: #fff; font-weight: 600; }
.footer__bar { border-top: 1px solid rgba(255,255,255,.1); padding-block: 22px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; font-size: .82rem; color: rgba(255,255,255,.5); }

@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* 11. ------------------------------------------------------------ BENTO GRID
   Grille 12 colonnes. Les cellules portent leur span via .span-N (desktop). */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(14px, 1.6vw, 22px);
}
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
.row-2 { grid-row: span 2; }

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .span-3, .span-4, .span-5 { grid-column: span 3; }
  .span-6, .span-7, .span-8 { grid-column: span 6; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .bento > * { grid-column: 1 / -1 !important; }
}

/* Carte de base */
.card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(22px, 2.6vw, 34px);
  box-shadow: var(--shadow);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  min-height: 200px;
}
.card > * { position: relative; z-index: 1; }
.card.is-hover:hover, .card--interactive:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* Variantes de fond (diversité bento : pas 6 cartes blanches identiques) */
.card--grad { background: var(--grad); color: #fff; border-color: transparent; }
.card--grad .body, .card--grad .lead { color: rgba(255,255,255,.86); }
.card--ink { background: var(--ink); color: #fff; border-color: transparent; }
.card--ink .body, .card--ink .lead { color: rgba(255,255,255,.74); }
.card--soft { background: var(--grad-soft); }

/* Carte image : média en fond ou en haut */
.card--media { padding: 0; }
.card--media .card__media { position: relative; width: 100%; aspect-ratio: 16 / 11; overflow: hidden; }
.card--media .card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card--media:hover .card__media img { transform: scale(1.04); }
.card--media .card__body { padding: clamp(20px, 2.4vw, 28px); }

/* Média plein-cadre avec overlay texte */
.card--cover { padding: 0; min-height: 320px; color: #fff; justify-content: flex-end; }
.card--cover img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.card--cover::after { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(22,32,46,0) 30%, rgba(22,32,46,.82) 100%); }
.card--cover .card__body { padding: clamp(22px, 2.6vw, 32px); }

.card__kicker { font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.card--grad .card__kicker, .card--ink .card__kicker, .card--cover .card__kicker { color: var(--mint); }

/* Chiffres de précision (signature) */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 3vw, 40px); }
@media (max-width: 680px) { .stats { grid-template-columns: 1fr; gap: 24px; } }
.stat .big {
  font-weight: 800;
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  letter-spacing: -.02em;
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .big .unit { font-size: .42em; font-weight: 700; }
.stat .lab { margin-top: 10px; font-size: .8rem; font-weight: 600; color: var(--ink-soft); max-width: 26ch; }
.section--ink .stat .lab { color: rgba(255,255,255,.7); }

/* Piliers (les 4 piliers de la brochure) */
.pillar {
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 200px;
  padding: clamp(22px, 2.4vw, 30px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pillar .moon { width: 120px; height: 120px; right: -38px; bottom: -42px; opacity: .42; }
.pillar__n { font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.pillar__t { margin-top: auto; font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; text-transform: uppercase; line-height: 1.15; position: relative; z-index: 1; }
.pillar__d { margin-top: 10px; font-size: .9rem; color: var(--ink-soft); position: relative; z-index: 1; }

/* Carte module (specs NGB-R) */
.module { display: flex; flex-direction: column; gap: 14px; padding: clamp(20px, 2.2vw, 26px); background: var(--white); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.module__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.module__name { font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; }
.module__code { font-size: .68rem; font-weight: 700; letter-spacing: .1em; color: var(--teal); }
.module__specs { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.module__specs li { font-size: .88rem; color: var(--ink-soft); padding-left: 18px; position: relative; }
.module__specs li::before { content: ""; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--grad); }

/* Ligne de publication (centre de ressources) */
.pub { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.pub__meta { font-size: .82rem; color: var(--ink-faint); }
.pub__meta strong { display: block; color: var(--ink); font-weight: 700; font-size: .92rem; }
.pub__title { font-size: .96rem; color: var(--ink); font-weight: 500; line-height: 1.4; }
.pub__tag { font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 5px 12px; white-space: nowrap; }
@media (max-width: 640px) {
  .pub { grid-template-columns: 1fr; gap: 8px; }
  .pub__tag { justify-self: start; }
}

/* Bandeau logos partenaires (logo seul, pas de label catégorie) */
.logo-wall { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(28px, 5vw, 64px); }
.logo-wall img { height: clamp(26px, 3vw, 38px); width: auto; opacity: .55; filter: grayscale(1); transition: opacity .25s var(--ease), filter .25s var(--ease); }
.logo-wall img:hover { opacity: 1; filter: grayscale(0); }

/* 12. ----------------------------------------------------- MOTION / REVEAL
   Géré par IntersectionObserver dans site.js (jamais d'écouteur scroll).
   MOTION_INTENSITY 4 : entrées douces translateY+opacity, hover micro-lift. */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); will-change: opacity, transform; }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal][data-reveal-delay="1"] { transition-delay: .07s; }
[data-reveal][data-reveal-delay="2"] { transition-delay: .14s; }
[data-reveal][data-reveal-delay="3"] { transition-delay: .21s; }
[data-reveal][data-reveal-delay="4"] { transition-delay: .28s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .card, .pillar, .btn, .card--media img { transition: none !important; }
  * { animation-duration: .001ms !important; }
}

/* Utilitaires ponctuels */
.u-center { text-align: center; }
.u-mt-s { margin-top: 1rem; }
.u-mt-m { margin-top: 1.6rem; }
.u-mt-l { margin-top: 2.4rem; }
.u-grad-rule { height: 3px; width: 56px; border-radius: 3px; background: var(--grad); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* 13. ----------------------------------------- EDITORIAL : LISTE + SINGLE
   Partagé par resources / news (pages liste + pages détail). */

/* Grilles de cartes */
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 1.8vw, 24px); }
.cards2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 1.8vw, 24px); }
@media (max-width: 900px) { .cards3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cards3, .cards2 { grid-template-columns: 1fr; } }

/* Carte post (article / news / ressource) */
.post { display: flex; flex-direction: column; overflow: hidden; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post__media { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--paper-2); }
.post__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post:hover .post__media img { transform: scale(1.04); }
.post__body { display: flex; flex-direction: column; gap: 10px; padding: clamp(18px, 2vw, 24px); flex: 1; }
.post__cat { font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
.post__title { font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; line-height: 1.25; color: var(--ink); }
.post__excerpt { font-size: .92rem; color: var(--ink-soft); line-height: 1.55; }
.post__meta { margin-top: auto; padding-top: 8px; font-size: .78rem; color: var(--ink-faint); display: flex; gap: 9px; align-items: center; }
.post__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-faint); }

/* Carte featured (large, horizontale) */
.post--feature { flex-direction: row; }
.post--feature .post__media { flex: 0 0 54%; aspect-ratio: auto; }
.post--feature .post__body { justify-content: center; gap: 14px; }
.post--feature .post__title { font-size: clamp(1.3rem, 2.4vw, 1.9rem); }
@media (max-width: 760px) { .post--feature { flex-direction: column; } .post--feature .post__media { flex: auto; aspect-ratio: 16/9; } }

/* Filtres catégorie (chips) — pilotés par site.js */
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.filter { border: 1.5px solid var(--line); background: var(--white); color: var(--ink-soft); border-radius: var(--r-pill); padding: 8px 16px; font-size: .78rem; font-weight: 700; letter-spacing: .02em; cursor: pointer; font-family: inherit; transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease); }
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Lignes de téléchargement */
.dl { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.dl:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.dl__ico { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 12px; background: var(--grad-soft); display: flex; align-items: center; justify-content: center; color: var(--blue-deep); font-weight: 800; font-size: .68rem; letter-spacing: .04em; }
.dl__t { font-weight: 700; font-size: .98rem; }
.dl__m { font-size: .8rem; color: var(--ink-faint); }
.dl__cta { margin-left: auto; flex: 0 0 auto; }

/* ARTICLE (single) */
.article { max-width: 760px; margin-inline: auto; }
.article__meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: .84rem; color: var(--ink-faint); margin-top: 16px; }
.article__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-faint); }
.article__dek { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--ink-soft); font-weight: 500; line-height: 1.45; margin-top: 14px; }
.article__hero { margin: clamp(24px, 4vw, 40px) auto; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--paper-2); }
.article__hero img { width: 100%; height: auto; display: block; cursor: zoom-in; }

/* Prose (corps d'article) */
.prose { font-size: 1.06rem; line-height: 1.7; color: var(--ink-soft); }
.prose > * + * { margin-top: 1.3em; }
.prose h2 { font-size: clamp(1.4rem, 2.4vw, 1.7rem); font-weight: 800; letter-spacing: -.01em; color: var(--ink); line-height: 1.2; margin-top: 1.8em; }
.prose h3 { font-size: 1.2rem; font-weight: 700; color: var(--ink); margin-top: 1.5em; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }
.prose ul { padding-left: 1.2em; display: grid; gap: .5em; }
.prose li::marker { color: var(--teal); }
.prose blockquote { margin: 1.6em 0; padding: 16px 24px; border-left: 3px solid var(--teal); border-radius: 0; font-size: 1.18rem; font-style: italic; color: var(--ink); }
.prose figure { margin: 1.6em 0; }
.prose figure img { width: 100%; border-radius: var(--r-sm); border: 1px solid var(--line); }
.prose figcaption { margin-top: 8px; font-size: .82rem; color: var(--ink-faint); text-align: center; }

/* Encadré takeaways */
.callout { background: var(--grad-soft); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(20px, 2.4vw, 28px); }
.callout h3 { margin: 0 0 12px; font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.callout ul { margin: 0; padding-left: 1.2em; display: grid; gap: .5em; color: var(--ink-soft); }
.callout li::marker { color: var(--teal); }


/* Back to top */
.to-top { position: fixed; right: clamp(16px,3vw,28px); bottom: clamp(16px,3vw,28px); z-index: 60; width:48px; height:48px; border-radius:50%; border:0; cursor:pointer; background: var(--grad); color:#fff; box-shadow: var(--shadow-lg); display:grid; place-items:center; opacity:0; transform: translateY(12px) scale(.92); pointer-events:none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
.to-top.show { opacity:1; transform:none; pointer-events:auto; }
.to-top:hover { transform: translateY(-3px); box-shadow: 0 18px 38px -12px rgba(28,83,183,.5); }
@media (prefers-reduced-motion: reduce) { .to-top { transition:none; } }

/* Footer legal row */
.site-footer .footer__legal { display:block; margin-top:6px; opacity:.75; }
.site-footer .footer__legal a { color:inherit; text-decoration:none; }
.site-footer .footer__legal a:hover { color:#fff; opacity:1; }

/* Inline PDF viewer */
.pdf-modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: clamp(10px,3vw,40px); }
.pdf-modal.show { display: flex; }
.pdf-modal__backdrop { position: absolute; inset: 0; background: rgba(16,32,46,.62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.pdf-modal__panel { position: relative; z-index: 1; width: min(980px,100%); height: min(88vh,100%); background: var(--white); border-radius: var(--r); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.pdf-modal__bar { display: flex; align-items: center; gap: 14px; padding: 11px 14px 11px 18px; border-bottom: 1px solid var(--line); }
.pdf-modal__title { font-weight: 700; font-size: .92rem; flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdf-modal__open { font-size: .8rem; font-weight: 600; color: var(--teal); flex: 0 0 auto; }
.pdf-modal__open:hover { text-decoration: underline; }
.pdf-modal__x { flex: 0 0 auto; width: 34px; height: 34px; border: 0; border-radius: 9px; background: var(--paper); font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink); transition: background .18s var(--ease); }
.pdf-modal__x:hover { background: var(--line); }
.pdf-modal__frame { flex: 1 1 auto; width: 100%; border: 0; background: var(--paper); }

/* Workflow steps */
.flow { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
@media (max-width: 840px) { .flow { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px) { .flow { grid-template-columns: 1fr; } }
.flow__step { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 20px; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.flow__step:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.flow__n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: #fff; font-weight: 800; font-size: .9rem; margin-bottom: 12px; }
.flow__t { font-weight: 700; font-size: 1rem; margin-bottom: 4px; }
.flow__d { font-size: .86rem; color: var(--ink-soft); line-height: 1.55; }

/* Sort control */
.sortbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: 20px; }
.sortbar label { font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.sort-select { font-family: inherit; font-size: .86rem; font-weight: 600; color: var(--ink); background-color: var(--white); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 8px 34px 8px 14px; cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2346566A' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.sort-select:hover { border-color: var(--ink-faint); }
.sort-select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,157,128,.15); }

/* Listing card publication date */
.post__date { font-size: .76rem; font-weight: 600; color: var(--ink-faint); margin-top: 10px; }

/* Inline PDF reader in articles */
.pdf-embed { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--paper-2); }
.pdf-embed__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--white); }
.pdf-embed__bar span { font-weight: 700; font-size: .9rem; }
.pdf-embed__open { font-size: .82rem; font-weight: 600; color: var(--teal); white-space: nowrap; }
.pdf-embed__open:hover { text-decoration: underline; }
.pdf-embed iframe { display: block; width: 100%; height: min(80vh, 640px); border: 0; background: var(--paper); }

/* Article image gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.gallery figure { margin: 0; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); background: var(--paper-2); }
.gallery img { display: block; width: 100%; height: auto; cursor: zoom-in; }


/* Gallery: keep natural heights (no stretch), preserve order */
.gallery { align-items: start; }

/* Listing card date pinned to bottom (aligned across cards) */
.post .post__date { margin-top: auto; padding-top: 12px; }

/* Image lightbox (article pop-up gallery) */
.lb { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; background: rgba(16,32,46,.92); padding: clamp(12px,4vw,48px); }
.lb.show { display: flex; }
.lb__img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r-sm); box-shadow: var(--shadow-lg); }
.lb__x { position: absolute; top: 18px; right: 22px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.lb__x:hover { background: rgba(255,255,255,.26); }
.lb__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb__nav:hover { background: rgba(255,255,255,.26); }
.lb__prev { left: 18px; } .lb__next { right: 18px; }
.lb__count { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.82); font-size: .85rem; font-weight: 600; }
@media (max-width: 640px) { .lb__nav { width: 42px; height: 42px; font-size: 1.6rem; } }

/* Real article content: tables + inline images */
.prose table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .92rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--paper-2); font-weight: 700; color: var(--ink); }
.prose img { max-width: 100%; height: auto; display: block; margin: 20px auto; border-radius: var(--r-sm); border: 1px solid var(--line); cursor: zoom-in; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.2em; }

/* Team + clinical collaborators */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px,1fr)); gap: clamp(16px,2.2vw,28px); }
.person { margin: 0; text-align: center; }
.person__ph { width: 120px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; margin: 0 auto 14px; background: var(--paper-2); border: 1px solid var(--line); }
.person__ph img { width: 100%; height: 100%; object-fit: cover; }
.person__ph--i { display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: 2rem; letter-spacing: .02em; }
.person figcaption strong { display: block; font-size: 1rem; color: var(--ink); }
.person figcaption span { font-size: .82rem; color: var(--ink-faint); }
.person__li { display: block; width: 20px; margin: 10px auto 0; color: var(--ink-faint); transition: color .2s ease; }
.person__li:hover { color: var(--teal); }
.person__li svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.team--clin { grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); max-width: 560px; }
.team--clin .person__ph { width: 150px; }

/* ---- Form UX : validation states + async success/error (used by forms.js) ---- */
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea,
.check.is-invalid input { border-color: #d64545; box-shadow: 0 0 0 3px rgba(214,69,69,.14); }
.form-err { display: block; margin-top: 6px; font-size: .78rem; font-weight: 600; color: #c0392b; }
.check.is-invalid .form-err { margin-top: 2px; }
.form-banner { margin-bottom: 16px; padding: 12px 14px; border-radius: 12px; font-size: .86rem;
  background: rgba(214,69,69,.08); border: 1px solid rgba(214,69,69,.3); color: #a93226; }
.form-success { background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); padding: clamp(28px,4vw,44px); text-align: center; }
.form-success__ic { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 16px; display: grid;
  place-items: center; color: #fff; font-size: 26px; background: var(--grad); }
.form-success p { color: var(--ink-soft); font-size: 1.02rem; margin: 0; line-height: 1.5; }
[type="submit"][aria-busy="true"] { opacity: .7; cursor: progress; }
