/* ============================================================
   MAPi · carnet.css — composants « carnet de bord V4 »
   Couche partagee extraite verbatim des pages temoins (medical/numerique).
   Depend de tokens.css + seo.css. Chemins d'assets relatifs a /assets/.
   Ne pas dupliquer en inline : une seule source de verite pour toutes les pages.
   ============================================================ */
/* ============================================================
   V4 · SYNTHÈSE : hero « plan d'atelier » (V2) + carnet de bord (V3).
   Sommaire regroupé, alignement unique 800px, tokens stricts.
   ============================================================ */
.cb-page { overflow-x: clip; }

/* ---------- H1 : soulignement pinceau orange ---------- */
.cb-brush { position: relative; display: inline-block; }
.cb-brush::after {
  content: ''; position: absolute; left: 1%; right: -1%; bottom: -.13em; height: .17em;
  background: var(--orange);
  -webkit-mask: url('da/brush-underline.svg') no-repeat center / 100% 100%;
  mask: url('da/brush-underline.svg') no-repeat center / 100% 100%;
}

/* ---------- Colonne éditoriale : lecture longue ---------- */
.doc { --doc-max: 800px; font-size: 18px; line-height: 1.7; counter-reset: cbchap; }
.doc h3 { font-size: 17.5px; }
.doc h2[id] { counter-increment: cbchap; position: relative; padding-top: 38px; margin-top: 2.3em; font-size: 24px; }
.mapi-band h2[id], .faq-sec h2[id] { margin-top: .4em; }
.doc h2[id]::before {
  content: 'Chapitre ' counter(cbchap, decimal-leading-zero);
  position: absolute; top: 0; left: 0; height: 22px; display: inline-flex; align-items: center;
  font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 800; font-size: 11.5px;
  letter-spacing: .15em; text-transform: uppercase; color: var(--blue-dark);
}
/* Filet quadrillé « papier millimétré » : deux linear-gradient croisés très pâles */
.doc h2[id]::after {
  content: ''; position: absolute; top: 1px; left: 122px; right: 0; width: auto; height: 20px;
  margin: 0; border-radius: 0; display: block;
  background:
    linear-gradient(to right, rgba(0, 109, 236, .10) 1px, transparent 1px) 0 0 / 10px 10px,
    linear-gradient(to bottom, rgba(0, 109, 236, .10) 1px, transparent 1px) 0 0 / 10px 10px;
  -webkit-mask: linear-gradient(90deg, #000 55%, transparent 97%);
  mask: linear-gradient(90deg, #000 55%, transparent 97%);
}

/* ---------- Rail gauche sticky : sommaire + progression ---------- */
.cb-railwrap { display: none; }
@media (min-width: 1280px) {
  .cb-railwrap { display: block; position: sticky; top: 92px; height: 0; z-index: 5; }
  .cb-rail { position: absolute; top: 0; left: calc(50% - 628px); width: 204px; }
  /* Panneau frosté sous le rail quand il chevauche une bande pleine largeur à fond bleu
     (sinon ligne + pastilles bleues deviennent ton sur ton). Piloté par carnet.js. */
  .cb-rail::before {
    content: ''; position: absolute; inset: -14px -12px -14px -16px; z-index: -1;
    border-radius: 16px; background: rgba(255, 255, 255, .95);
    box-shadow: 0 16px 38px -18px rgba(0, 40, 90, .5), 0 0 0 1px rgba(255, 255, 255, .55);
    -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
    opacity: 0; transform: scale(.985); transform-origin: 28% 42%;
    transition: opacity .3s var(--ease), transform .3s var(--ease); pointer-events: none;
  }
  .cb-rail.is-onblue::before { opacity: 1; transform: none; }
  .cb-rail-t {
    font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 800; font-size: 11px;
    letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); margin: 4px 0 10px 32px;
  }
  .cb-rail-list {
    position: relative; display: flex; flex-direction: column; gap: 1px;
    max-height: calc(100vh - 160px); overflow-y: auto; overscroll-behavior: contain; padding-right: 4px;
  }
  .cb-rail-track { position: absolute; left: 10px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--gray-300); }
  .cb-rail-fill {
    position: absolute; inset: 0; border-radius: 2px; background: var(--blue);
    transform: scaleY(0); transform-origin: top center; will-change: transform;
  }
  .cb-rail-a {
    position: relative; display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 3px 8px 3px 32px;
    font-size: 12.5px; font-weight: 700; line-height: 1.25; color: var(--text-secondary);
    text-decoration: none; border-radius: 9px;
  }
  .cb-rail-a i {
    font-style: normal; font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 800;
    font-size: 10.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; flex: 0 0 auto;
  }
  .cb-rail-a::before {
    content: ''; position: absolute; left: 7px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
    border-radius: 50%; background: var(--gray-100); border: 2px solid var(--gray-300); box-sizing: border-box;
    transition: border-color .18s, background .18s, box-shadow .18s;
  }
  .cb-rail-a:hover { color: var(--blue-dark); background: var(--blue-pale); }
  /* Section franchie : pastille bleue pleine, alignée sur la ligne remplie */
  .cb-rail-a.is-done i { color: var(--blue); }
  .cb-rail-a.is-done::before { border-color: var(--blue); background: var(--blue); }
  /* Section courante : anneau « vous êtes ici » */
  .cb-rail-a.is-on { color: var(--blue-dark); }
  .cb-rail-a.is-on::before { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px var(--blue-pale); }
  .cb-rail-a.is-on i { color: var(--blue); }
  /* Le mini-simulateur conserve son accent orange dans tous les états */
  .cb-rail-a--tool i, .cb-rail-a--tool.is-done i, .cb-rail-a--tool.is-on i { color: var(--orange); }
  .cb-rail-a--tool.is-done::before { border-color: var(--orange); background: var(--orange); }
  .cb-rail-a--tool.is-on::before { border-color: var(--orange); background: #fff; box-shadow: 0 0 0 3px var(--orange-soft); }
}

/* ---------- Encarts « le chiffre » en marge ---------- */
.cb-figure {
  float: right; width: 208px; margin: 6px 0 16px 24px; padding: 14px 16px 15px;
  border: 1px solid var(--gray-200);
  border-radius: 14px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 4px;
  background-color: #fff;
  background-image:
    linear-gradient(to right, rgba(0, 109, 236, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 109, 236, .05) 1px, transparent 1px);
  background-size: 12px 12px;
}
.cb-figure::before { content: ''; width: 28px; height: 3px; border-radius: 2px; background: var(--orange); }
.cbf-k {
  font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 800; font-size: 10.5px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-secondary);
}
.cbf-v {
  font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 900; font-size: 30px;
  line-height: 1.05; letter-spacing: -.02em; color: var(--blue); font-variant-numeric: tabular-nums;
}
.cbf-s { font-size: 12.5px; line-height: 1.45; color: var(--text-secondary); }
@media (min-width: 1280px) { .cb-figure { width: 204px; margin-right: -240px; margin-left: 26px; } }
@media (max-width: 700px) { .cb-figure { float: none; width: auto; margin: 18px 0; } }

/* ---------- Ponctuation de fin de section (objets 3D) ---------- */
.cb-fin { display: flex; align-items: center; gap: 18px; margin: 2.4em 0 0; }
.cb-fin::before, .cb-fin::after { content: ''; flex: 1; height: 1px; }
.cb-fin::before { background: linear-gradient(90deg, transparent, var(--gray-300)); }
.cb-fin::after { background: linear-gradient(90deg, var(--gray-300), transparent); }
.cb-fin img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0, 40, 90, .22)); }

/* ---------- Frise verticale de l'accompagnement ---------- */
.cb-tl-marks { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.2em 0 .2em; }
.cb-tl-marks button {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 15px;
  background: #fff; border: 1.5px solid var(--gray-300); border-radius: var(--radius-pill);
  font: inherit; font-size: 12.5px; font-weight: 800; color: var(--text-secondary); cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.cb-tl-marks button b {
  font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 900;
  color: var(--blue); font-variant-numeric: tabular-nums;
}
.cb-tl-marks button i { font-style: normal; }
.cb-tl-marks button:hover { border-color: var(--blue); color: var(--blue-dark); }
.cb-tl-marks button.is-done { border-color: var(--blue-muted); color: var(--blue-dark); }
.cb-tl-marks button.is-on { background: var(--blue); border-color: var(--blue); color: #fff; }
.cb-tl-marks button.is-on b { color: #fff; }
@media (max-width: 700px) { .cb-tl-marks button i { display: none; } .cb-tl-marks button { padding: 0 13px; } }

.cb-tl { position: relative; }
.cb-tl::before { content: ''; position: absolute; left: 19px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--gray-200); }
.cb-tl-fill {
  position: absolute; left: 19px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, var(--blue), #2E8AF0);
  transform: scaleY(0); transform-origin: top center; will-change: transform;
}
.mapi-band .cb-tl ol { margin: .5em 0 .4em; position: relative; }
.mapi-band .cb-tl li { padding-left: 62px; margin: 1.6em 0; position: relative; }
.mapi-band .cb-tl li::before {
  left: 0; top: -2px; width: 40px; height: 40px; font-size: 15px;
  background: #fff; color: var(--blue-dark); border: 2px solid var(--gray-300); box-sizing: border-box;
  transition: border-color .2s, background .2s, color .2s, box-shadow .2s;
}
/* Étape franchie : pastille bleue pleine (suit la ligne de progression) */
.mapi-band .cb-tl li.is-done::before {
  background: var(--blue); border-color: var(--blue); color: #fff;
}
/* Étape courante : pastille pleine + anneau « vous êtes ici » */
.mapi-band .cb-tl li.is-on::before {
  background: var(--blue); border-color: var(--blue); color: #fff;
  box-shadow: 0 0 0 4px var(--blue-pale), 0 6px 16px -6px rgba(0, 109, 236, .55);
}
.mapi-band .cb-tl li > strong { font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; }
.cb-tl-panel { margin-top: 14px; max-width: 470px; }

/* Panneaux visuels de la frise (langage des cartes MAPi) */
.tb-doc, .tb-team, .tb-pay {
  background: #fff; border: 1.5px solid var(--gray-200); border-radius: 16px; overflow: hidden;
  box-shadow: 0 14px 34px -18px rgba(0, 60, 130, .25);
}
.tb-doc-head, .tb-team-head, .tb-pay-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; background: var(--gray-100); border-bottom: 1.5px solid var(--gray-200);
}
.tb-doc-name, .tb-team-title {
  font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 800; font-size: 14px; color: var(--text-primary);
}
.tb-doc-src, .tb-team-badge {
  font-size: 11px; font-weight: 800; color: var(--blue); background: var(--blue-pale);
  border: 1px solid var(--blue-muted); padding: 3px 11px; border-radius: var(--radius-pill); white-space: nowrap;
}
.tb-doc-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--gray-200); }
.tb-aid-type {
  flex: 0 0 92px; align-self: flex-start; padding: 5px 8px; border-radius: var(--radius-pill);
  font-size: 10.5px; font-weight: 900; line-height: 1; letter-spacing: .04em; text-align: center; text-transform: uppercase;
}
.tb-aid-type.subvention { color: var(--green-ink); background: var(--green-soft); }
.tb-aid-type.pret { color: var(--blue); background: var(--blue-pale); }
.tb-aid-type.fiscal { color: var(--orange-ink); background: var(--orange-soft); }
.tb-aid-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tb-aid-main b { font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-size: 13px; font-weight: 800; line-height: 1.25; color: var(--text-primary); }
.tb-aid-main span { font-size: 12px; line-height: 1.35; color: var(--text-secondary); }
.tb-doc-foot, .tb-team-foot { padding: 11px 16px; border-top: none; font-size: 12.5px; font-weight: 700; color: var(--blue); background: #fff; }
.tb-team-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; }
.tb-team-avatars { display: flex; align-items: center; flex-wrap: wrap; }
.tb-team-avatars img {
  width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: 50% 15%;
  border: 3px solid #fff; box-shadow: 0 6px 14px -6px rgba(0, 40, 90, .45); margin-left: -14px; background: var(--blue-pale);
}
.tb-team-avatars img:first-child { margin-left: 0; }
.tb-team-count { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.tb-team-foot { border-top: 1.5px solid var(--gray-200); background: var(--gray-100); }
.tb-pay-bank {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 800; font-size: 13.5px; color: var(--text-primary);
}
.tb-pay-bank::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.tb-pay-badge {
  font-size: 11px; font-weight: 800; letter-spacing: .02em; color: var(--green-ink); background: var(--green-soft);
  border: 1px solid #BDEBCD; padding: 3px 11px; border-radius: var(--radius-pill); white-space: nowrap;
}
.tb-pay-body { padding: 16px 18px 15px; }
.tb-pay-row { display: flex; align-items: center; gap: 12px; }
.tb-pay-ic {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 900; line-height: 1;
  box-shadow: 0 6px 14px -5px rgba(45, 174, 84, .55);
}
.tb-pay-row div b { display: block; font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 800; font-size: 15px; line-height: 1.15; }
.tb-pay-row div span { display: block; font-size: 12.5px; color: var(--text-muted); margin-top: 1px; }
.tb-pay-amt {
  font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 900; font-size: 38px;
  letter-spacing: -.02em; color: var(--green-ink); margin-top: 12px; font-variant-numeric: tabular-nums;
}
.tb-pay-to { font-size: 12.5px; font-weight: 700; color: var(--text-secondary); margin-top: 3px; }
.tb-pay-foot { padding: 11px 16px; border-top: 1.5px solid var(--gray-200); background: var(--gray-100); font-size: 12.5px; font-weight: 700; color: var(--text-secondary); }
.tb-pay-foot b { color: var(--blue); font-weight: 800; }

/* ---------- Bande océan : mini-simulateur ---------- */
.cb-ocean {
  position: relative; margin-top: 3em;
  margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
  background: linear-gradient(165deg, #003E8E 0%, #0053BE 45%, var(--blue) 100%);
  color: #fff; padding: 64px 20px 52px; overflow: hidden; scroll-margin-top: 84px;
}
.cb-ocean::before, .cb-ocean::after {
  content: ''; position: absolute; left: 0; right: 0; height: 16px; background: var(--gray-100);
  z-index: 3; pointer-events: none;
  -webkit-mask: url('da/wave-tile.svg') repeat-x bottom / auto 16px;
  mask: url('da/wave-tile.svg') repeat-x bottom / auto 16px;
}
.cb-ocean::before { top: -1px; transform: scaleY(-1); }
.cb-ocean::after { bottom: -1px; }
.cb-ocean .cb-cloud { position: absolute; opacity: .3; pointer-events: none; z-index: 0; height: auto; }
.cb-cloud.c1 { width: 190px; top: 30px; left: 4%; }
.cb-cloud.c2 { width: 140px; top: 46px; right: 5%; opacity: .22; }
.cb-ocean-in { position: relative; z-index: 2; max-width: 1000px; margin: 0 auto; }
.cb-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 800; font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--blue-muted);
}
.cb-eyebrow svg { width: 16px; height: 16px; }
.doc .cb-ocean h2 {
  font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 900;
  font-size: clamp(24px, 3.2vw, 31px); line-height: 1.15; color: #fff;
  margin: 10px 0 6px; letter-spacing: -.015em;
}
.doc .cb-ocean h2::after, .doc .cb-ocean h2::before { display: none; content: none; }
.cb-ocean-sub { font-size: 15px; color: var(--blue-muted); max-width: 62ch; margin: 0; }
.cb-sim-grid { display: grid; grid-template-columns: 1.06fr .94fr; gap: 26px; margin-top: 26px; align-items: stretch; }
/* Une seule colonne des que la phrase manque de place (sinon les slots se cassent
   sur plusieurs lignes et la carte devient tres haute). */
@media (max-width: 1080px) { .cb-sim-grid { grid-template-columns: 1fr; } }
.cb-ocean a:focus-visible, .cb-ocean button:focus-visible { outline-color: #fff; }

.cb-sim {
  display: flex; flex-direction: column; gap: 16px; padding: 24px 26px;
  border-radius: 18px; border: 2px dashed rgba(255, 255, 255, .34); background: rgba(255, 255, 255, .08);
}
.cb-sim-cap { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; color: var(--blue-muted); text-transform: uppercase; }
/* Hauteur verrouillee par carnet.js (pire cas) : choisir une option ne fait plus
   grandir la carte. La valeur inline min-height vient du JS. */
.doc .cb-sim-sentence { font-size: 15.5px; line-height: 2.05; font-weight: 500; color: #fff; margin: 0; }
.cbs-slot {
  /* Bordure transparente : slot rempli et slot vide (bordure pointillee) ont la meme
     boite, donc aucun saut au remplissage.
     line-height serre + marge verticale : sans cela le slot herite du line-height de la
     phrase, sa boite depasse la ligne et les carres blancs se chevauchent d'une ligne
     a l'autre. La marge verticale (prise en compte pour un inline-block) cree l'espace. */
  border: 1.5px solid transparent; background: #fff; color: var(--blue-dark);
  font: inherit; font-weight: 700; font-size: .95em; line-height: 1.3;
  text-align: left; max-width: 100%; vertical-align: middle;
  border-radius: 7px; padding: 3px 9px; margin: 4px 1px; cursor: pointer; min-height: 30px;
  box-shadow: 0 1px 4px rgba(0, 60, 130, .25);
}
.cbs-slot.is-empty, .cbs-ph {
  background: transparent; color: rgba(255, 255, 255, .88); border: 1.5px dashed rgba(255, 255, 255, .5);
  font-style: italic; box-shadow: none; border-radius: 7px; padding: 3px 9px;
}
.cb-sim-amount-l { display: block; font-size: 13px; font-weight: 700; color: var(--blue-muted); margin-bottom: 8px; }
.cb-sim-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cb-sim-chip {
  min-height: 44px; border: 1.5px solid rgba(255, 255, 255, .42); background: transparent; color: #fff;
  font: inherit; font-size: 13.5px; font-weight: 700; padding: 0 16px; border-radius: var(--radius-pill);
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.cb-sim-chip:hover { border-color: #fff; }
.cb-sim-chip[aria-pressed="true"] {
  background: #fff; border-color: #fff; color: var(--blue-dark);
  box-shadow: 0 8px 18px -8px rgba(0, 30, 70, .6);
}
.cb-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 22px;
  background: #fff; color: var(--blue-dark); border: none; border-radius: var(--radius-pill);
  font: inherit; font-size: 14.5px; font-weight: 800; cursor: pointer; text-decoration: none;
  box-shadow: 0 12px 26px -10px rgba(0, 20, 60, .55);
  transition: transform .15s, box-shadow .15s, background .15s; align-self: flex-start;
}
.doc .cb-pill { color: var(--blue-dark); text-decoration: none; }
.cb-pill:hover { transform: translateY(-1px); background: var(--blue-pale); }
.doc a.cb-pill:hover { color: var(--blue-dark); }
.cb-pill:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.cb-pill svg { width: 17px; height: 17px; color: var(--orange); flex: 0 0 auto; }
.cb-pill.is-busy { transform: scale(.97); opacity: .85; pointer-events: none; }

.cb-sim-result {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  border-radius: 18px; background: rgba(0, 35, 80, .38); border: 1px solid rgba(255, 255, 255, .2);
  padding: 22px 24px; overflow: hidden;
}
.cb-simres-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  text-align: center; min-height: 240px; color: var(--blue-muted);
}
.cb-simres-empty .ic {
  width: 52px; height: 52px; border-radius: 14px; background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .25); display: flex; align-items: center; justify-content: center;
}
.cb-simres-empty .ic svg { width: 24px; height: 24px; }
.doc .cb-simres-empty p { font-size: 13.5px; max-width: 30ch; line-height: 1.5; margin: 0; }
/* Rythme : 8px a l'interieur d'un groupe, 16px entre deux groupes distincts
   (les typologies se lisent comme un bloc, separe du potentiel et de la note). */
.cb-simres { display: none; flex-direction: column; gap: 16px; position: relative; z-index: 2; }
.cb-simres.is-on { display: flex; }
.cb-simres.is-stale { opacity: .5; filter: saturate(.6); transition: opacity .25s, filter .25s; }
.cb-simres-head { display: flex; align-items: flex-start; gap: 13px; }
.cb-simres-check {
  position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 7px 16px -5px rgba(0, 0, 0, .45);
}
.cb-simres-check svg { width: 18px; height: 18px; }
.cb-simres-title { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-top: 1px; }
.cb-simres-kicker { font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 900; font-size: 13px; line-height: 1.2; color: var(--green-soft); }
.doc .cb-simres-heading {
  font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 900; font-size: clamp(19px, 2.2vw, 22px);
  line-height: 1.15; letter-spacing: -.015em; color: #fff; margin: 0; text-wrap: balance;
}
.cb-typos { display: flex; flex-direction: column; gap: 8px; }
.cb-typo { display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: 12px; border: 1px solid; font-weight: 700; font-size: 14px; }
.cb-typo .lt-ic { width: 30px; height: 30px; border-radius: 8px; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cb-typo .lt-ic svg { width: 15px; height: 15px; }
.cb-typo.t-sub { background: var(--blue-pale); border-color: var(--blue-muted); color: var(--blue-dark); }
.cb-typo.t-sub .lt-ic { color: var(--blue); border: 1px solid var(--blue-muted); }
.cb-typo.t-pret { background: var(--orange-soft); border-color: #FFDFC7; color: var(--orange-ink); }
.cb-typo.t-pret .lt-ic { color: var(--orange-ink); border: 1px solid #FFDFC7; }
.cb-typo.t-exo { background: var(--green-soft); border-color: #BDEBCD; color: var(--green-ink); }
.cb-typo.t-exo .lt-ic { color: var(--green-ink); border: 1px solid #BDEBCD; }
/* Padding horizontal aligne sur .cb-typo et .cb-simres-note (14px) : les trois blocs
   empiles ont la meme largeur, un retrait different se voyait sur le bord gauche. */
.cb-potcard { display: flex; flex-direction: column; gap: 3px; background: #fff; border-radius: 14px; padding: 14px; position: relative; overflow: hidden; }
.cb-potcard .pot-k { font-size: 12.5px; font-weight: 700; color: var(--text-secondary); }
.cb-potcard .pot-v {
  font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 900; font-size: 26px;
  line-height: 1.1; color: var(--blue); font-variant-numeric: tabular-nums;
}
.cb-potcard .pot-s { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.doc .cb-simres-note {
  font-size: 12.5px; line-height: 1.55; margin: 0; padding: 11px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); color: rgba(255, 255, 255, .92);
}
.cb-simres-note b { color: #fff; }
.cb-simres-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
/* CTA pleine largeur du bloc. Padding vertical : en dessous de 1081px la carte est
   large, le libelle tient ; sur les tres petits ecrans il peut passer sur deux lignes
   et doit alors respirer. */
.cb-simres-actions .cb-pill {
  flex: 1 1 100%; padding: 10px 18px; line-height: 1.3; text-align: center;
}
.cb-simres-actions .cb-pill svg { width: 16px; height: 16px; }
/* A partir de 1081px le simulateur passe en deux colonnes : la colonne resultat ne
   fait plus que ~295px utiles et le libelle du CTA y cassait sur deux lignes.
   Echelle resserree + nowrap, uniquement la ou la contrainte existe. En dessous,
   forcer une ligne imposerait un corps de texte trop petit (illisible a 320px). */
@media (min-width: 1081px) {
  .cb-simres-actions .cb-pill {
    white-space: nowrap; font-size: 13.5px; padding: 0 15px; gap: 8px; min-height: 46px;
  }
}
.cb-sim-reset {
  display: inline-flex; align-items: center; gap: 7px; background: none; border: none; font: inherit;
  font-weight: 700; font-size: 13px; color: var(--blue-muted); cursor: pointer; padding: 10px 13px;
  min-height: 44px; border-radius: 10px; transition: background .15s, color .15s;
  margin-left: -13px; /* alignement optique : l'icone tombe sur le bord du bloc */
}
.cb-sim-reset:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.cb-sim-reset svg { width: 15px; height: 15px; }
.doc .cb-legal {
  font-size: 11.5px; color: rgba(255, 255, 255, .85); line-height: 1.5;
  margin: 24px 0 0; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .24);
}

/* Vague de révélation claire (signature) */
.cb-wavewrap { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; border-radius: 18px; }
.cb-wave { position: absolute; left: -4%; right: -4%; top: -80px; bottom: -80px; display: flex; flex-direction: column; transform: translateY(108%); }
.cbw-crest { flex: 0 0 64px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='80' viewBox='0 0 320 80' preserveAspectRatio='none'%3E%3Cpath d='M0,42 C60,22 100,22 160,42 C220,62 260,62 320,42 L320,80 L0,80 Z' fill='%23D4EAFF'/%3E%3C/svg%3E") repeat-x bottom / 340px 64px; }
.cbw-body { flex: 1; background: linear-gradient(180deg, #D4EAFF 0%, #7FB8F7 100%); }
.cbw-crest-b { flex: 0 0 64px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='80' viewBox='0 0 320 80' preserveAspectRatio='none'%3E%3Cpath d='M0,42 C60,22 100,22 160,42 C220,62 260,62 320,42 L320,80 L0,80 Z' fill='%237FB8F7'/%3E%3C/svg%3E") repeat-x bottom / 340px 64px; transform: scaleY(-1); }
.cbw-bottle { position: absolute; top: 10px; left: 55%; width: 88px; height: auto; filter: drop-shadow(0 10px 16px rgba(0, 40, 90, .4)); }
.is-scanning .cb-wave { transform: translateY(0); transition: transform .55s cubic-bezier(.3, .75, .35, 1); }
.is-rising .cb-wave { transform: translateY(-112%); transition: transform .62s cubic-bezier(.6, .04, .72, .25); }
.cbw-drop { position: absolute; top: 16%; width: 9px; height: 9px; border-radius: 50% 50% 50% 0; background: #D4EAFF; opacity: 0; transform: rotate(-45deg); }
.cb-sparkle {
  position: absolute; font-size: 22px; color: var(--yellow);
  text-shadow: 0 0 10px rgba(252, 200, 68, .9), 0 0 22px rgba(255, 255, 255, .6); opacity: 0; z-index: 6;
}

/* ---------- Animations (uniquement si le mouvement est accepté) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .cb-rev, .cb-tl li { transition: opacity .55s var(--ease), transform .65s var(--ease); }
  .cb-rev.is-off, .cb-tl li.is-off { opacity: 0; transform: translateY(18px); }
  .cb-cloud.c1 { animation: cb-drift 60s ease-in-out infinite; }
  .cb-cloud.c2 { animation: cb-drift 75s ease-in-out infinite reverse; }
  .cb-simres.is-on > * { animation: cbres-in .5s var(--ease) both; }
  .cb-simres.is-on > *:nth-child(2) { animation-delay: .1s; }
  .cb-simres.is-on > *:nth-child(3) { animation-delay: .2s; }
  .cb-simres.is-on > *:nth-child(4) { animation-delay: .3s; }
  .cb-simres.is-on > *:nth-child(5) { animation-delay: .4s; }
  .cb-simres.is-on .cb-simres-check { animation: cbres-pop .55s cubic-bezier(.34, 1.56, .64, 1) .08s both; }
  .cb-simres.is-on .cb-typo { animation: cbres-in .45s var(--ease) both; }
  .cb-simres.is-on .cb-typo:nth-child(1) { animation-delay: .18s; }
  .cb-simres.is-on .cb-typo:nth-child(2) { animation-delay: .3s; }
  .cb-simres.is-on .cb-simres-check::before, .cb-simres.is-on .cb-simres-check::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    border: 2px solid rgba(45, 174, 84, .55); animation: cb-ripple .95s ease-out .3s 2;
  }
  .cb-simres.is-on .cb-simres-check::after { animation-delay: .62s; }
  .is-scanning .cbw-bottle, .is-rising .cbw-bottle { animation: cbw-rock 1.1s ease-in-out infinite; }
  .is-rising .cbw-drop { animation: cbw-drop .75s cubic-bezier(.2, .5, .6, 1) var(--dd) both; }
  .is-splash .cb-sparkle { animation: cb-twinkle .85s ease-in-out var(--sd) both; }
  .is-splash .cb-potcard::after {
    content: ''; position: absolute; top: 0; bottom: 0; width: 55%; left: -60%;
    background: linear-gradient(105deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .65), rgba(255, 255, 255, 0));
    animation: cb-shine .9s ease-in-out .55s both;
  }
}
@keyframes cb-drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(40px); } }
@keyframes cbres-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes cbres-pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes cb-ripple { from { transform: scale(1); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }
@keyframes cb-shine { to { left: 110%; } }
@keyframes cbw-rock { 0%, 100% { transform: rotate(-7deg) translateY(0); } 50% { transform: rotate(5deg) translateY(-6px); } }
@keyframes cbw-drop {
  0% { opacity: 0; transform: translate(0, 0) rotate(-45deg) scale(.7); }
  12% { opacity: .95; }
  55% { transform: translate(calc(var(--dx) * .7), -46px) rotate(-45deg) scale(1); opacity: .9; }
  100% { transform: translate(var(--dx), 26px) rotate(-45deg) scale(.5); opacity: 0; }
}
@keyframes cb-twinkle {
  0% { opacity: 0; transform: scale(0) rotate(-30deg); }
  45% { opacity: 1; transform: scale(1.25) rotate(10deg); }
  100% { opacity: 0; transform: scale(.4) rotate(30deg); }
}

/* ---------- Menu contextuel du simulateur ---------- */
.cbp-scrim { display: none; }
.cbp-pop {
  position: fixed; z-index: 120; background: #fff; border: 1.5px solid var(--gray-200); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 7px 9px; min-width: 250px; max-width: 420px; display: none;
}
.cbp-pop.is-open { display: block; }
.cbp-bar { display: none; }
.cbp-list { display: flex; flex-direction: column; gap: 2px; max-height: min(480px, 72vh); overflow-y: auto; overscroll-behavior: contain; }
.cbp-opt {
  text-align: left; background: none; border: none; font: inherit; font-size: 14px; color: var(--text-primary);
  padding: 10px 12px; min-height: 44px; border-radius: 8px; cursor: pointer;
}
.cbp-opt:hover { background: var(--blue-pale); color: var(--blue-dark); }
.cbp-opt[aria-pressed="true"] { background: var(--blue-pale); color: var(--blue-dark); font-weight: 800; box-shadow: inset 3px 0 0 var(--blue); }
@media (max-width: 640px) {
  body.has-cb-pop { overflow: hidden; }
  .cbp-scrim.is-open { display: block; position: fixed; inset: 0; z-index: 119; background: rgba(13, 35, 64, .46); }
  .cbp-pop {
    left: 10px !important; right: 10px; top: auto !important; bottom: max(10px, env(safe-area-inset-bottom));
    min-width: 0; max-width: none; max-height: min(82dvh, calc(100dvh - 20px)); padding: 0; border-radius: 20px;
  }
  .cbp-pop.is-open { display: flex; flex-direction: column; }
  .cbp-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 8px 10px 8px 18px; border-bottom: 1px solid var(--gray-200); }
  .cbp-title { font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-size: 17px; font-weight: 900; color: var(--text-primary); }
  .cbp-close {
    width: 44px; height: 44px; flex: 0 0 44px; border: 0; border-radius: 12px; background: var(--gray-100);
    color: var(--text-primary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  }
  .cbp-close svg { width: 21px; height: 21px; }
  .cbp-list { padding: 8px; max-height: none; flex: 1 1 auto; -webkit-overflow-scrolling: touch; }
  .cbp-opt { min-height: 48px; font-size: 15px; }
}

/* ---------- Barre fixe de comparaison des variantes ---------- */
.cb-vars {
  position: fixed; left: 14px; bottom: 14px; z-index: 80;
  display: flex; gap: 3px; padding: 4px; border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .95); border: 1px solid var(--gray-200); box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.cb-vars a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 13px; border-radius: var(--radius-pill);
  font-size: 12.5px; font-weight: 800; color: var(--text-secondary); text-decoration: none;
  transition: background .14s, color .14s;
}
.cb-vars a:hover { background: var(--blue-pale); color: var(--blue-dark); }
.cb-vars a[aria-current="page"] { background: var(--blue); color: #fff; }
@media (max-width: 700px) { .cb-vars a { padding: 0 10px; font-size: 12px; } }

/* ---------- Mouvement réduit : tout est neutralisé ---------- */
@media (prefers-reduced-motion: reduce) {
  .cb-cloud, .cbw-bottle, .cbw-drop, .cb-sparkle,
  .cb-simres.is-on > *, .cb-simres.is-on .cb-typo, .cb-simres.is-on .cb-simres-check { animation: none !important; }
  .cb-wave, .cb-rev, .cb-tl li, .cb-rail-fill, .cb-tl-fill,
  .cb-tl-marks button, .cb-pill, .cb-sim-chip, .cb-rail-a::before, .cb-rail::before, .cb-vars a { transition: none !important; }
  .cb-simres.is-on .cb-simres-check::before, .cb-simres.is-on .cb-simres-check::after { content: none; }
}

/* ============================================================
   V4 · Hero « plan d'atelier » (repris de V2, sans liseré latéral)
   ============================================================ */
.hero {
  background:
    linear-gradient(180deg, rgba(247, 249, 252, 0), rgba(247, 249, 252, .72) 76%, #F7F9FC 100%),
    repeating-linear-gradient(0deg, rgba(0, 109, 236, .055) 0 1px, transparent 1px 36px),
    repeating-linear-gradient(90deg, rgba(0, 109, 236, .055) 0 1px, transparent 1px 36px),
    #FFFFFF;
  color: var(--text-primary);
  border-bottom: 1px solid var(--gray-200);
}
.hero .crumb { color: var(--text-muted); }
.hero .crumb a { color: var(--text-secondary); opacity: 1; }
.hero .crumb a:hover { color: var(--blue-dark); }
.hero .crumb .sep { opacity: .6; }
.hero .crumb [aria-current="page"] { color: var(--blue-dark); font-weight: 700; }
.hero h1 { color: var(--text-primary); font-size: clamp(27px, 5.6vw, 40px); }
.hero-question {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--blue-pale); border: 1px solid var(--blue-muted);
  color: var(--blue-dark); border-radius: var(--radius-pill);
  padding: 8px 16px; font-weight: 700; font-size: 14px; margin: 2px 0 14px;
}
.hero-chapo {
  background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius);
  box-shadow: var(--shadow-md); color: var(--text-primary);
  margin-left: -20px; margin-right: -20px; padding: 18px 20px;
}
@media (max-width: 700px) { .hero-chapo { margin-left: 0; margin-right: 0; } }
.hero-chapo strong { color: var(--text-primary); }
.hero-note { color: var(--text-secondary); }
.hero-byline { color: var(--text-muted); }
.hero-actions .btn--white { background: var(--blue); color: #fff; box-shadow: 0 12px 26px -12px rgba(0, 109, 236, .55); }
.hero-actions .btn--white:hover { background: var(--blue-dark); }
.hero a:focus-visible { outline-color: var(--blue); }
.hero-obj img { filter: drop-shadow(0 14px 26px rgba(0, 109, 236, .22)); }
.wave-sep { opacity: .85; }

/* ============================================================
   V4 · Alignement unique : tout s'aligne sur la colonne de
   lecture (800px, gouttières 20px), hero compris. Le phare et
   les encarts vivent dans la marge droite au-delà de 1280px.
   ============================================================ */
.hero-in { max-width: 800px; padding-bottom: 40px; }
@media (min-width: 1280px) {
  .hero-grid { position: relative; display: block; }
  .hero-obj { position: absolute; top: 10px; right: -238px; margin: 0; }
}
.cb-ocean-in { max-width: 760px; padding-left: 0; padding-right: 0; }

/* ---------- Rail : groupes du carnet de bord ---------- */
@media (min-width: 1280px) {
  .cb-rail-g {
    display: flex; align-items: center; gap: 7px; margin: 13px 0 3px 20px;
    font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 800; font-size: 10px;
    letter-spacing: .15em; text-transform: uppercase; color: var(--blue-dark);
  }
  .cb-rail-g::before { content: ''; flex: 0 0 auto; width: 12px; height: 2.5px; border-radius: 2px; background: var(--orange); }
  .cb-rail-track + .cb-rail-g { margin-top: 2px; }
}

/* ---------- Sommaire de page : carnet de bord ---------- */
.cb-toc {
  border: 1px solid var(--gray-200); border-radius: var(--radius); background: #fff;
  box-shadow: var(--shadow-sm); padding: 18px 20px 20px; margin: 1.6em -20px 2em;
}
@media (max-width: 700px) { .cb-toc { margin-left: 0; margin-right: 0; } }
/* seo.css genere deja un libelle « Sommaire » via ::before : on le neutralise ici
   pour ne garder qu'un seul titre, porte par .cb-toc-t (qui tient le filet millimetre). */
.doc nav.cb-toc[aria-label="Sommaire"]::before { content: none; }
.cb-toc-t {
  display: flex; align-items: center; gap: 12px; margin: 0 0 8px;
  font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 800; font-size: 13px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-secondary);
}
.cb-toc-t::after {
  content: ''; flex: 1; height: 16px;
  background:
    linear-gradient(to right, rgba(0, 109, 236, .10) 1px, transparent 1px) 0 0 / 8px 8px,
    linear-gradient(to bottom, rgba(0, 109, 236, .10) 1px, transparent 1px) 0 0 / 8px 8px;
  -webkit-mask: linear-gradient(90deg, #000 55%, transparent 98%);
  mask: linear-gradient(90deg, #000 55%, transparent 98%);
}
.cb-toc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 30px; }
.cb-toc-g > p {
  display: flex; align-items: center; gap: 8px; margin: 12px 0 2px;
  font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 800; font-size: 10.5px;
  letter-spacing: .13em; text-transform: uppercase; color: var(--blue-dark);
}
.cb-toc-g > p::before { content: ''; flex: 0 0 auto; width: 14px; height: 2.5px; border-radius: 2px; background: var(--orange); }
.cb-toc-g ul { list-style: none; margin: 0; padding: 0; }
.cb-toc-g li { margin: 0; }
.cb-toc-g a {
  display: flex; align-items: baseline; gap: 9px; padding: 5px 0;
  font-size: 14.5px; line-height: 1.35; color: var(--text-secondary);
  text-decoration: none;
}
.cb-toc-g a:hover { color: var(--blue-dark); }
.cb-toc-g a:hover, .cb-toc-g a:focus-visible { text-decoration: underline; text-underline-offset: 2px; }
.cb-toc-g a i {
  font-style: normal; flex: 0 0 auto;
  font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 800; font-size: 10.5px;
  color: var(--text-muted); font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) { .cb-toc { padding: 15px 16px 16px; } .cb-toc-grid { grid-template-columns: 1fr; gap: 0; } }

/* ---------- Sommaire mobile : carnet repliable sticky ---------- */
.cb-mtoc { display: none; }
@media (max-width: 1279.98px) {
  .cb-mtoc {
    display: block; position: sticky; top: 48px; z-index: 18; margin: 0;
    background: rgba(255, 255, 255, .95); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--gray-200);
  }
  .cb-mtoc summary {
    list-style: none; display: flex; align-items: center; gap: 10px; min-height: 48px;
    padding: 0 20px; cursor: pointer; color: var(--text-primary);
  }
  .cb-mtoc summary::-webkit-details-marker { display: none; }
  .cb-mtoc summary:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
  .cb-mtoc-k {
    font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 800; font-size: 10.5px;
    letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); flex: 0 0 auto;
  }
  .cb-mtoc-cur {
    flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-size: 13.5px; font-weight: 800; color: var(--blue-dark);
  }
  .cb-mtoc summary svg { flex: 0 0 auto; color: var(--text-secondary); transition: transform .18s; }
  .cb-mtoc[open] summary svg { transform: rotate(180deg); }
  .cb-mtoc-p {
    max-height: min(52dvh, 430px); overflow-y: auto; overscroll-behavior: contain;
    padding: 2px 12px 12px; border-top: 1px solid var(--gray-200);
  }
  .cb-mtoc-g {
    display: flex; align-items: center; gap: 8px; margin: 11px 8px 2px;
    font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 800; font-size: 10px;
    letter-spacing: .15em; text-transform: uppercase; color: var(--blue-dark);
  }
  .cb-mtoc-g::before { content: ''; flex: 0 0 auto; width: 14px; height: 2.5px; border-radius: 2px; background: var(--orange); }
  .cb-mtoc-p a {
    display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px;
    border-radius: 10px; font-size: 13.5px; font-weight: 700; color: var(--text-secondary);
    text-decoration: none;
  }
  .cb-mtoc-p a:hover, .cb-mtoc-p a.is-on { background: var(--blue-pale); color: var(--blue-dark); }
  .cb-mtoc-p a:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
  .cb-mtoc-p a i {
    font-style: normal; font-family: 'Museo Sans', 'Mukta Mahee', sans-serif; font-weight: 800;
    font-size: 10.5px; color: var(--text-muted); font-variant-numeric: tabular-nums;
  }
}
.mapi-band { margin-left: -20px; margin-right: -20px; padding-left: 20px !important; padding-right: 20px !important; }
@media (max-width: 700px) { .mapi-band { margin-left: 0; margin-right: 0; } }
.cb-vars { padding-bottom: max(6px, env(safe-area-inset-bottom)); }
@media (prefers-reduced-motion: reduce) { .cb-mtoc summary svg { transition: none; } }
