/* index_V1.html : ce qui n'est ni dans site.css ni dans la figure de Hotelling. */

/* « Trois terrains » : la carte des domaines à gauche, le texte à droite (en miroir de l'accueil, rosace à droite) */
.intro-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); column-gap: clamp(32px, 6vw, 96px); align-items: center; }
.intro-grid > h2, .intro-grid > .lead, .intro-grid > .station-nav { grid-column: 2; }
/* index_V6 : sous l'introduction, les cinq terrains en raccourcis vers leurs sections */
.intro-grid > .station-nav { align-self: start; margin-top: 18px; }
.station-nav a { color: var(--ink-2); text-decoration: underline; text-decoration-color: color-mix(in oklab, currentColor 30%, transparent); text-underline-offset: 3px; transition: color var(--fast) var(--ease), text-decoration-color var(--fast) var(--ease); }
.station-nav a:hover { color: var(--ink); text-decoration-color: currentColor; }
/* index_V6 : compétences en bref, dans le parcours */
.skills-h { margin: 22px 0 0; font: 500 1.0625rem/1.4 var(--sans); }
/* deux colonnes qui se lisent de haut en bas, une compétence par ligne, un petit losange devant chacune */
.about-copy .skills { display: block; columns: 2 14rem; column-gap: 28px; margin-top: 10px; }
.about-copy .skills li { break-inside: avoid; position: relative; padding: 3px 0 3px 16px; color: var(--ink-2); }
.about-copy .skills li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg); opacity: .8; }
.about-copy .skills li::after { content: none; }
/* index_V6 : publications, la liste tenue à jour ailleurs ; contact, deux liens sur une ligne */
.pub-more { margin: 10px 0 0; font-size: .9375rem; color: var(--ink-3); }
.pub-more a { color: var(--accent-ink); }
.c-links { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.intro-grid > h2 { align-self: end; }
.intro-grid > .lead { align-self: start; }
.venn-fig { grid-column: 1; grid-row: 1 / span 3; margin: 0; }
.venn { display: block; width: 100%; height: auto; overflow: visible; }

/* couleurs des quatre domaines, sur fond sombre puis sur fond clair */
.venn { --v-stat: #6aa8e8; --v-ling: #ec7f9a; --v-bio: #63c08a; --v-info: #e8a13a; }
:root[data-theme="light"] .venn { --v-stat: #2b6cb0; --v-ling: #c0396b; --v-bio: #2f855a; --v-info: #b7791f; }
.venn .v-ell { fill-opacity: .09; stroke-width: 1.4; vector-effect: non-scaling-stroke; transition: fill-opacity 260ms ease, stroke-width 260ms ease; }
/* survol (v1.js) : niveau 1 au repos, 2 pour les domaines qui se croisent sous le pointeur, 3 pour la zone survolée */
.venn .v-eg { transform: translate(var(--vt, 0px, 0px)); transform-box: fill-box; transform-origin: center; transition: transform 900ms cubic-bezier(.22, 1, .36, 1); }
.venn .v-eg.is-on { transform: translate(var(--vt, 0px, 0px)) scale(1.015); }
.venn .v-eg.lv2 .v-ell { fill-opacity: .17; }
.venn .v-eg.lv3 .v-ell { fill-opacity: .27; stroke-width: 2; }
.venn .v-eg.lv2 .v-ell { stroke-width: 1.8; }
.venn .v-hi { fill: var(--ink); opacity: 0; pointer-events: none; transition: opacity 260ms ease; }
.venn .v-hi.on { opacity: .12; }
.venn.v-over-zone { cursor: pointer; }
.venn-pop-s { margin: 8px 0 3px; font-size: .72rem; font-weight: 600; color: var(--ink-3); }
.venn-pop { max-height: min(70vh, 420px); overflow-y: auto; }
.venn .v-stat { fill: var(--v-stat); stroke: var(--v-stat); }
.venn .v-ling { fill: var(--v-ling); stroke: var(--v-ling); }
.venn .v-bio { fill: var(--v-bio); stroke: var(--v-bio); }
.venn .v-info { fill: var(--v-info); stroke: var(--v-info); }
.venn text { font-family: var(--sans); }
.venn .v-name { font-size: 16px; font-weight: 600; stroke: none; }
.venn .v-pair { font-size: 13px; fill: var(--ink-2); }
.venn .v-in { font-size: 12px; }
.venn .v-center { font-size: 19px; font-weight: 600; fill: var(--ink); }
.venn .v-lead { fill: none; stroke: var(--ink-3); stroke-width: .8; vector-effect: non-scaling-stroke; }
.venn .v-dot { fill: var(--ink-2); }

/* carte : un domaine se touche, et ouvre la liste des collaborations */
.venn-fig { position: relative; }
.venn .v-click { cursor: pointer; outline: none; }
.venn .v-click:hover, .venn .v-click:focus-visible { text-decoration: underline; text-decoration-thickness: .5px; text-underline-offset: 3px; }
.venn-hint { margin-top: 6px; text-align: center; font-size: .75rem; color: var(--ink-3); }
.venn-pop { position: absolute; z-index: 5; width: min(280px, 92%); padding: 10px 14px 12px; border: 1px solid var(--line-2); border-radius: 12px;
  background: color-mix(in oklab, var(--surface) 82%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px -12px rgb(0 0 0 / .25); font-size: .8125rem; color: var(--ink); }
.venn-pop[hidden] { display: none; }
.venn-pop-t { margin: 0 0 4px; font-weight: 600; }
.venn-pop ul { margin: 0; padding-left: 16px; display: grid; gap: 3px; color: var(--ink-2); }

/* définitions au survol : un pointillé discret, sans couleur de lien ; la bulle (v1.js) reste dans l'écran */
.gl { cursor: help; text-decoration: underline dotted; text-decoration-color: color-mix(in oklab, currentColor 45%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1px; outline: none; }
.gl:hover, .gl:focus-visible { text-decoration-color: currentColor; }
.gl-tip { position: absolute; z-index: 60; padding: 8px 11px; border-radius: 9px; background: var(--ink); color: var(--bg); font: 400 .8rem/1.45 var(--sans); box-shadow: 0 8px 24px -10px rgb(0 0 0 / .35); pointer-events: none; }
.gl-tip[hidden] { display: none; }

/* « La grande dimension » : le titre à la hauteur du haut du panneau */
#high-dimension .station-grid { align-items: start; }

/* « Le langage » : appel de note et note de bas de texte */
.fn-ref { margin-inline-start: 1px; color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.fn-ref:hover { text-decoration: underline; }
.station-copy .fn { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .8125rem; line-height: 1.55; color: var(--ink-3); max-width: 52ch; }
.station-copy .fn span { color: var(--accent-ink); font-weight: 600; }
#language .station-grid { align-items: start; }

/* fenêtre de contexte : très transparente, elle glisse avec le mot et couvre ses voisins */
.fig-pos { position: relative; }
.ctx-win { position: absolute; z-index: 0; border: 1px dashed color-mix(in oklab, var(--accent) 55%, transparent); border-radius: 12px; background: color-mix(in oklab, var(--accent) 5%, transparent); pointer-events: none;
  transition: left 380ms var(--ease), top 380ms var(--ease), width 380ms var(--ease), height 380ms var(--ease); }
.ctx-win[hidden] { display: none; }
.ctx-win span { position: absolute; top: -8px; right: 10px; padding: 0 5px; border-radius: 4px; background: var(--surface); font: 400 .62rem/1.3 var(--mono); color: var(--accent-ink); letter-spacing: .02em; }
.fig-pos .pos-line { position: relative; z-index: 1; }
.kv-intro { margin: 0 0 12px; font-size: .78rem; color: var(--ink-2); }

/* probabilités de chaque nature, sans puis avec le contexte */
.fig-pos .tok.is-on { background: var(--raised); border-color: var(--line-2); }
.pos-proba { display: grid; gap: 16px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
/* consigne discrète, juste au-dessus des mots ; définition de « nature » au-dessus des barres */
.pos-hint { margin: 0 0 6px; font-size: .75rem; color: var(--ink-3); opacity: .75; }
/* invitation en bas de chaque figure : discrète, mais toujours au même endroit */
.fig-ask { margin: 12px 0 0; font-size: .75rem; line-height: 1.45; color: var(--ink-3); font-style: normal; }
.fig-ask a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: .5px; text-underline-offset: 3px; }
.fig-ask a:hover { text-decoration-thickness: 1px; }
/* taille du contexte : petit bouton discret en haut à droite, qui ouvre le choix ±1 à ±4 */
.pos-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; }
.pos-top .pos-hint { margin: 0; }
.pos-ctx { position: relative; z-index: 3; display: flex; flex-direction: row-reverse; align-items: center; gap: 6px; }
.pos-ctx-btn { padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; font: 400 .7rem var(--mono); color: var(--ink-3); background: transparent; }
.pos-ctx-btn:hover, .pos-ctx-btn[aria-expanded="true"] { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.pos-ctx-btn b { font-weight: 500; }
.pos-ctx-menu { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--raised); }
.pos-ctx-menu[hidden] { display: none; }
.pos-ctx-menu button { padding: 2px 8px; border-radius: 999px; font: 400 .7rem var(--mono); color: var(--ink-2); }
.pos-ctx-menu button[aria-pressed="true"] { color: var(--ink); background: color-mix(in srgb, var(--accent) 14%, transparent); }
/* « nature » dans les formules : souligné en pointillé, bulle au survol ou au toucher */
.pp-nat { position: relative; border-bottom: 1px dotted currentColor; cursor: help; outline: none; }
.pp-nat::after { content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 4; padding: 5px 9px; border-radius: 7px; background: var(--ink); color: var(--bg); font: 400 .75rem/1.3 var(--sans); white-space: nowrap; opacity: 0; transform: translateY(3px); pointer-events: none; transition: opacity .15s, transform .15s; }
.pp-nat:hover::after, .pp-nat:focus::after { opacity: 1; transform: none; }
/* un toucher hors de la zone interactive : pause ou lecture, signalée par un rond au centre */
.fig-pos, .fig-kv { position: relative; }
.fig-pos, .fig-kv { cursor: pointer; }
.fig-pos :is(.pos-line, .pp-src, a, button), .fig-kv :is(.kv-seqs, a, button, input, .seg-set) { cursor: auto; }
.fig-pos .tok, .kv-s2 button, .fig-pos button, .fig-kv button, .fig-pos a { cursor: pointer; }
.tap-flash { position: absolute; left: 50%; top: 50%; z-index: 3; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--ink) 72%, transparent); color: var(--bg); opacity: 0; pointer-events: none; }
.tap-flash .icon { width: 26px; height: 26px; }
.tap-flash.show { animation: tap-flash 700ms var(--ease) forwards; }
@keyframes tap-flash { 0% { opacity: 0; transform: scale(.8); } 25% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.15); } }
.pp-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pp-play { flex: none; width: 30px; height: 30px; border: 1px solid var(--line-2); border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.pp-play:hover { background: var(--raised); color: var(--ink); }
.pp-play .icon { width: 14px; height: 14px; }
.pp-nav { flex: none; display: inline-flex; gap: 6px; }
.pp-nav .pp-play { font-size: 1rem; line-height: 1; padding-bottom: 2px; }
.pp-alt b { font-weight: 600; color: var(--ink); }
.pos-hint2 { opacity: .85; }
/* un peu d'air entre la ligne d'indication (et le bouton du contexte) et le cadre « contexte » des mots */
.pos-top { margin-bottom: 18px; }
/* temps restant sur le mot affiché */
.pp-timer { display: block; height: 2px; margin-top: -8px; border-radius: 1px; background: var(--line); overflow: hidden; }
.pp-timer i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.pp-timer.run i { animation: pp-fill var(--dwell, 3500ms) linear forwards; }
@keyframes pp-fill { to { transform: scaleX(1); } }
.pp-head { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.pp-word { font: var(--display-weight) 1.5rem/1.2 var(--display); color: var(--ink); }
.pp-alt { font-size: .8125rem; color: var(--ink-3); }
.pp-title { margin: 0 0 8px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-size: .875rem; font-weight: 500; color: var(--ink); }
.pp-f { font: 400 .75rem/1.5 var(--mono); color: var(--ink-3); }
.pp-bars { display: grid; gap: 6px; }
.pp-row { display: grid; grid-template-columns: 4.2rem 1fr 3.2rem; align-items: center; gap: 10px; font: 400 .75rem var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pp-row.is-best { color: var(--ink); }
.pp-track { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.pp-track i { display: block; height: 100%; width: calc(var(--v) * 1%); border-radius: 4px; background: var(--ink-3); opacity: .55; transition: width 420ms var(--ease); }
.pp-row.is-best .pp-track i { background: var(--accent); opacity: 1; }
.pp-val { text-align: end; }
.pp-verdict { margin: 0; font-size: .9375rem; color: var(--ink-2); }
.pp-f b { font-weight: 600; color: var(--ink); }
.pp-kv { white-space: nowrap; }
.pp-row { grid-template-columns: 6.6rem 1fr 3.2rem; }
/* d'où viennent les pourcentages : dépliable */
.pp-foot { margin: 16px 0 0; font-size: .75rem; color: var(--ink-3); }
.pp-foot b { font-weight: 600; color: var(--ink-2); }
.pp-about { margin-top: 8px; padding: 0; font-size: .75rem; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.pp-about:hover { color: var(--ink); text-decoration-color: currentColor; }
.pp-src { margin-top: 8px; padding-inline-start: 12px; border-inline-start: 2px solid var(--line-2); }
.pp-src p { margin: 6px 0 0; font-size: .78rem; line-height: 1.55; color: var(--ink-2); }
.pp-src a { color: var(--accent-ink); }
.pp-src[hidden] { display: none !important; }

/* « Le vivant » : k et lecture, outils, S1 et S2, leurs vecteurs de k-mers côte à côte, deux cosinus */
#dna .station-grid { align-items: start; }
.kv-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.kv-top .ctl { grid-template-columns: auto auto; gap: 12px; }
.kv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 14px; }
.kv-mut { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--ink-2); }
.kv-n { width: 3.2rem; height: 30px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--bg); font: 400 .8125rem var(--mono); color: var(--ink); text-align: center; }
.kv-n:focus, .kv-input:focus { outline: none; border-color: var(--accent); }
.kv-btn { min-height: 30px; padding-inline: 10px; border: 1px solid var(--line-2); border-radius: 7px; font-size: .78rem; color: var(--ink-2); }
.kv-btn:hover, .kv-btn[aria-expanded="true"] { background: var(--raised); color: var(--ink); }
.kv-hint { font-size: .75rem; color: var(--ink-3); }
.kv-input { width: 100%; margin-top: 8px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); font: 400 .875rem var(--mono); letter-spacing: .12em; color: var(--ink); }
.kv-input[hidden] { display: none; }
/* les deux séquences, chacune sur une seule ligne, l'une juste sous l'autre */
.kv-seqs { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px 10px; margin-top: 14px; }
.kv-lab { font: 600 .75rem var(--mono); color: var(--ink-2); }
.fig-kv .seq { display: flex; justify-content: space-between; font: 400 clamp(.5rem, 2.2cqi, .8rem)/1 var(--mono); }
.fig-kv .seq > * { flex: 1 1 0; min-width: 0; padding: 4px 0; border-radius: 2px; text-align: center; }
.kv-s1 span { color: var(--ink); }
.kv-s2 button { font: inherit; color: var(--ink); cursor: pointer; transition: background-color 120ms linear; }
.kv-s2 button:hover { background: var(--raised); }
.kv-s2 button.diff { background: color-mix(in oklab, var(--accent) 22%, transparent); color: var(--accent-ink); font-weight: 600; }
.kv-s2 button.done { color: var(--ink-3); }
.kv-s2 button.diff.done { color: var(--accent-ink); }
.kv-s2 button.on { background: var(--accent); color: var(--on-accent); }
.kv-grids { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.kv-grids figure { margin: 0; display: grid; justify-items: center; gap: 6px; }
.kv-grids .kgrid { width: 100%; }
.kv-grids figcaption { font: 600 .8125rem var(--mono); color: var(--ink-2); }
.kv-grids .cell { cursor: default; }
.kv-grids .cell.is-on { outline: 2px solid var(--ink); outline-offset: -1px; }
.kv-grids .kgrid[data-k="1"] .cell-n { font-size: .95rem; }
.kv-grids .kgrid[data-k="3"] { gap: 2px; }
.kv-grids .kgrid[data-k="4"] { gap: 1px; }
/* mesures, juste sous les grilles */
.kv-res { display: grid; gap: 4px; margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--raised); }
.kv-out { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 18px; font: 400 .8125rem/1.5 var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.kv-out b { color: var(--ink); font-weight: 600; }
.kv-o-lab { min-width: 6.5em; color: var(--ink-2); }
.kv-def { margin: 12px 0 0; font-size: .78rem; line-height: 1.55; color: var(--ink-3); }
.fig-kv .controls[hidden] { display: none; }

/* réglages en onglets sous chaque graphique (ptabs.js) : une rangée d'onglets, puis le curseur de l'onglet ouvert */
.ptabs { margin-top: 4px; }
/* chaque onglet a l'allure d'un petit bouton : bord, léger relief, reflet ; l'onglet ouvert se colle à sa ligne de réglage */
.pt-tabs { display: flex; flex-wrap: wrap; gap: 4px 4px; padding-bottom: 4px; border-bottom: 1px solid var(--line-2); }
.pt-tab { position: relative; display: inline-flex; align-items: center; gap: 2px; padding: 3px 8px 3px 9px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .74rem; color: var(--ink-2); white-space: nowrap;
  background: linear-gradient(180deg, color-mix(in oklab, var(--surface) 70%, white) 0%, var(--surface) 100%);
  box-shadow: 0 1px 0 rgb(255 255 255 / .6) inset, 0 1px 2px rgb(0 0 0 / .08); transition: transform var(--fast) var(--ease), border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
:root[data-theme="dark"] .pt-tab { background: linear-gradient(180deg, color-mix(in oklab, var(--raised) 85%, white) 0%, var(--raised) 100%); box-shadow: 0 1px 0 rgb(255 255 255 / .08) inset, 0 1px 2px rgb(0 0 0 / .4); }
.pt-tab:hover { color: var(--ink); border-color: color-mix(in oklab, var(--accent) 55%, var(--line-2)); transform: translateY(-1px); box-shadow: 0 1px 0 rgb(255 255 255 / .6) inset, 0 3px 8px -2px color-mix(in oklab, var(--accent) 35%, transparent); }
.pt-tab:active { transform: translateY(0); }
.pt-tab .pt-v { font: 600 .7rem var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.pt-chev { width: 6px; height: 6px; margin-left: 5px; border-right: 1.3px solid currentColor; border-bottom: 1.3px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .6; transition: transform var(--fast) var(--ease); }
.pt-tab[aria-selected="true"] { border-color: var(--accent); color: var(--ink); box-shadow: 0 0 0 2px color-mix(in oklab, var(--accent) 22%, transparent); }
.pt-tab[aria-selected="true"] .pt-chev { transform: translateY(1px) rotate(-135deg); opacity: 1; }
/* onglet-case (α auto) : une petite case qui se coche, teinte d'accent quand elle est active */
.pt-toggle { gap: 6px; }
.pt-box { width: 11px; height: 11px; border: 1.2px solid var(--ink-3); border-radius: 3px; display: inline-grid; place-items: center; }
.pt-toggle[aria-pressed="true"] { border-color: var(--accent); color: var(--accent-ink); background: color-mix(in oklab, var(--accent) 10%, var(--raised)); }
.pt-toggle[aria-pressed="true"] .pt-box { border-color: var(--accent); background: var(--accent); }
.pt-toggle[aria-pressed="true"] .pt-box::after { content: ""; width: 5px; height: 3px; border: 1.5px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.seg-set button:disabled { opacity: .35; cursor: not-allowed; }
.pt-extra { grid-column: 1 / -1; justify-self: start; min-height: 26px; padding: 0 12px; border: 1px solid var(--accent); border-radius: 999px; font-size: .74rem; font-weight: 500; color: var(--accent-ink); background: color-mix(in oklab, var(--accent) 8%, transparent); }
.pt-extra:hover { background: color-mix(in oklab, var(--accent) 16%, transparent); }
/* case à cocher sous un curseur (pénalité calibrée) ; curseur verrouillé tant qu'elle est cochée */
.pt-check { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px 0 8px; cursor: pointer; }
.pt-check input { margin: 0; accent-color: var(--accent); }
.pt-ctl.is-locked .ht-val, .pt-ctl.is-locked .pt-range { opacity: .55; }
.pt-ctl.is-locked .ht-num { color: var(--accent-ink); }
.fn-auto { margin: 2px 0 0; font-size: .72rem; color: var(--accent-ink); }
.fn-auto:empty { display: none; }
/* avancement du calcul, dans la légende du graphique */
.g-pct { margin-left: .35em; padding: 0 6px; border-radius: 999px; font: 500 .68rem var(--mono); font-variant-numeric: tabular-nums; color: var(--accent-ink); background: color-mix(in srgb, var(--accent-ink) 10%, transparent); white-space: nowrap; transition: opacity .4s; }
.g-pct:empty { display: none; }
.g-pct.done { opacity: .45; }
/* panneau 5 : barre d'avancement et temps restant au bout de la légende du graphique d'erreur */
.ht-prog.dc-prog { display: inline-flex; height: auto; margin: 0 0 0 .5em; vertical-align: middle; }
.ht-prog.dc-prog[hidden] { display: none !important; }
.dc-prog .ht-prog-bar { width: 72px; }
.pt-range { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; }
.pt-lim { font: 400 .66rem var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pt-row { position: relative; padding: 8px 4px 2px; }
.pt-row[hidden] { display: none; }
.pt-ctl { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; }
.pt-ctl input[type="range"] { width: 100%; min-width: 0; }
.pt-row .seg-set button { width: auto; min-width: 34px; height: 26px; padding-inline: 8px; font-size: .74rem; }
.pt-row .dc-adv { margin: 0; }
@container (max-width: 480px) { .pt-ctl { grid-template-columns: 1fr; } .pt-ctl .ht-val { justify-self: start; } }

/* « Les courbes » : quatre petits graphiques en 2 × 2 */
.fn-cap-zoom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 8px; }
.fn-zoom { padding: 1px; }
.fn-zoom button { min-width: 20px; height: 20px; padding-inline: 4px; font-size: .72rem; }
#curves .station-grid, #signal .station-grid { align-items: start; }
.fig-func .ht-chart { position: relative; }
.fn-grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 6px; }
.fn-card { margin: 0; min-width: 0; }
.fn-card figcaption { margin-bottom: 2px; font-size: .75rem; color: var(--ink-2); }
/* matrice 2 × 2 alignée : chaque carte occupe trois rangées de la grille (légende, graphique, reste), partagées
   d'une colonne à l'autre ; les graphiques d'une même ligne commencent donc à la même hauteur */
.fn-grid4 { grid-auto-rows: auto; row-gap: 0; }
.fn-card { display: grid; grid-row: span 3; grid-template-rows: subgrid; }
.fn-card figcaption { align-self: end; }
.fn-below { padding-bottom: 14px; }
.fn-note { margin: 3px 0 0; font-size: .7rem; line-height: 1.4; color: var(--ink-3); }
.fn-note[hidden] { display: none; }
.fn-model { margin-top: 6px; }
.fn-model .fn-mnote { margin: 0; font-size: .78rem; color: var(--ink-3); }
.fn-plot { display: block; width: 100%; height: auto; overflow: hidden; }
.fn-plot text { font: 400 8.5px var(--mono); fill: var(--ink-3); }
.fn-plot .fn-xl { fill: var(--ink-3); font-style: italic; }
.fn-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.fn-base { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
.fn-zero { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.fn-curve { fill: none; stroke: var(--ink-3); stroke-width: .8; opacity: .55; vector-effect: non-scaling-stroke; }
.fn-mean { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.fn-stem { stroke: var(--ink-3); stroke-width: 1; opacity: .6; vector-effect: non-scaling-stroke; }
.fn-dot { fill: var(--ink-3); }
.fn-stem.is-big { stroke: var(--accent); opacity: 1; }
.fn-dot.is-big { fill: var(--accent); }
.fn-alpha { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; }
.fn-plot .fn-alpha-t { font: italic 600 10px var(--sans); fill: var(--ink); }
.fn-bar { fill: var(--accent); opacity: .8; }
.fn-bar.rej { fill: var(--reject); opacity: 1; }
.fig-func.is-running .fn-bar { opacity: .55; }
.fn-box line, .fn-box rect { stroke: var(--ink); stroke-width: 1.3; vector-effect: non-scaling-stroke; }
.fn-box rect { fill: var(--surface); }
.fn-bound { stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; }
.fn-level { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.fn-mark { stroke: var(--ink-2); stroke-width: 1; opacity: .6; vector-effect: non-scaling-stroke; }
.fn-pw-bound { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.fn-pw-perm { fill: none; stroke: var(--reject); stroke-width: 2; vector-effect: non-scaling-stroke; }
.fn-pw-bound-d { fill: var(--accent); }
.fn-pw-perm-d { fill: var(--reject); }
.fn-leg { margin: 2px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .72rem; color: var(--ink-2); }
.fn-leg b { font-weight: 600; color: var(--ink); }
.sw-ln { display: inline-block; width: 14px; border-top: 2px solid; }
.sw-ln-bound { border-color: var(--accent); }
.sw-ln-perm { border-color: var(--reject); }
.sw-ln-level { border-top: 1px dashed var(--ink-3); }
.fn-noworker[hidden] { display: none; }
@container (max-width: 480px) { .fn-grid4 { grid-template-columns: 1fr; } }

/* « Le signal » : réglages, deux nuages dans le plan complexe, tableau vrai / estimé */
.fig-dc { --reject: #e5484d; --dc0: #2f6fd6; --dc1: #d6453d; --dc2: #2a9d63; }
:root[data-theme="dark"] .fig-dc { --dc0: #6aa8e8; --dc1: #ef7a6f; --dc2: #5cc58c; }
.dc-ctl { display: grid; gap: 10px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.dc-sl { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; font-size: .78rem; color: var(--ink-2); }
.dc-sl input[type="range"] { grid-column: 1 / -1; width: 100%; }
.dc-sl .pt-range { grid-column: 1 / -1; }
.dc-sl .pt-range input[type="range"] { min-width: 0; }
.dc-sl output { font: 400 .74rem var(--mono); color: var(--ink); }
.dc-sl[hidden] { display: none; }
.dc-alpha { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; }
.dc-atab { border-collapse: collapse; font-size: .75rem; color: var(--ink-2); }
.dc-atab th { font-weight: 400; padding: 0 4px 2px; text-align: center; }
.dc-atab th[scope="row"] { text-align: start; white-space: nowrap; }
.dc-atab td { padding: 1px 2px; }
.dc-in { width: 3.6rem; text-align: center; border-color: var(--line-2); }
.dc-adv { font-size: .78rem; color: var(--ink-2); }
.dc-adv summary { cursor: pointer; width: fit-content; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.dc-adv summary:hover { color: var(--ink); }
.dc-adv ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.dc-adv-item { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.dc-adv-item input { accent-color: var(--accent); }
.dc-adv .dc-sl { margin: 4px 0 2px 24px; }
.dc-plots { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 4px; }
.dc-plots figure { margin: 0; min-width: 0; }
.dc-plots figcaption { font-size: .75rem; color: var(--ink-2); margin-bottom: 4px; }
.dc-plot { display: block; width: 100%; height: auto; border-radius: 10px; background: var(--raised); }
.dc-ax { stroke: var(--line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
/* quadrillage et graduations des plans complexes ; on les parcourt en glissant, une fois zoomé */
.dc-gl { stroke: var(--line); stroke-width: .6; vector-effect: non-scaling-stroke; opacity: .7; }
.dc-tick { font: 400 6.5px var(--mono); fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.dc-plot { cursor: grab; user-select: none; -webkit-user-select: none; }
.dc-plot.is-dragging { cursor: grabbing; }
.dc-plot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fig-dc.is-zoomed .dc-plot { touch-action: none; }
.dc-pts { fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-linecap: round; opacity: .32; }
.dc-pts-z { opacity: .3; }
.dc-true { fill-opacity: .28; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.dc-est { fill: none; stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.dc-true.dc-c0 { fill: var(--dc0); stroke: var(--dc0); } .dc-true.dc-c1 { fill: var(--dc1); stroke: var(--dc1); } .dc-true.dc-c2 { fill: var(--dc2); stroke: var(--dc2); }
.dc-est.dc-c0 { stroke: var(--dc0); } .dc-est.dc-c1 { stroke: var(--dc1); } .dc-est.dc-c2 { stroke: var(--dc2); }
.dc-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle; }
.dc-dot.dc-c0 { background: var(--dc0); } .dc-dot.dc-c1 { background: var(--dc1); } .dc-dot.dc-c2 { background: var(--dc2); }
.dc-lab { font: italic 400 9px var(--sans); fill: var(--ink-3); }
.dc-leg { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .75rem; color: var(--ink-2); }
.dc-leg span { display: inline-flex; align-items: center; gap: 6px; }
/* légende collée sous son graphique, avant les onglets de réglages */
.dc-grid .dc-leg { margin: 4px 0 6px; gap: 2px 10px; font-size: .72rem; }
.dc-key { width: 11px; height: 11px; }
.dc-key-true { border-radius: 50%; border: 1.5px solid var(--ink-2); background: color-mix(in oklab, var(--ink-2) 28%, transparent); }
.dc-key-est { background: none; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); background-color: var(--ink-2); }
.dc-table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: .75rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dc-table th, .dc-table td { padding: 3px 6px; border-bottom: 1px solid var(--line); text-align: start; }
.dc-table thead th { font-weight: 500; color: var(--ink-3); }
.dc-table tbody th { font-weight: 400; white-space: nowrap; }
.dc-table td { font-family: var(--mono); font-size: .72rem; color: var(--ink); }
.dc-runs { margin: 6px 0 0; font-size: .72rem; color: var(--ink-3); }
.dc-wip { margin-top: 16px; font-size: .8125rem; color: var(--ink-3); }
.dc-noworker[hidden], .fig-dc [data-only-model][hidden] { display: none; }
/* matrice 2 × 2 : les deux plans complexes en haut, l'erreur selon n en bas sur toute la largeur */
.dc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.dc-grid figure { margin: 0; min-width: 0; }
.dc-grid figcaption { font-size: .75rem; color: var(--ink-2); margin-bottom: 4px; }
.dc-grid .dc-wide { grid-column: 1 / -1; }
.dc-errplot text { font: 400 8.5px var(--mono); fill: var(--ink-3); }
.dc-errplot .fn-xl { font-style: italic; }
.dc-sig { stroke-width: 1; stroke-opacity: .45; fill-opacity: .1; vector-effect: non-scaling-stroke; }
.dc-sig.dc-c0 { fill: var(--dc0); stroke: var(--dc0); } .dc-sig.dc-c1 { fill: var(--dc1); stroke: var(--dc1); } .dc-sig.dc-c2 { fill: var(--dc2); stroke: var(--dc2); }
.dc-stxt { font: 400 9px var(--mono); fill: var(--ink-2); }
.dc-stxt-e { fill: var(--ink); font-weight: 600; }
.fig-dc { --e0: #2f6fd6; --e1: #8a5cc7; --e2: #2a9d63; --e3: #d6453d; }
:root[data-theme="dark"] .fig-dc { --e0: #6aa8e8; --e1: #b493e8; --e2: #5cc58c; --e3: #ef7a6f; }
.dc-eline { fill: none; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.dc-eline.dc-e0 { stroke: var(--e0); } .dc-eline.dc-e1 { stroke: var(--e1); } .dc-eline.dc-e2 { stroke: var(--e2); } .dc-eline.dc-e3 { stroke: var(--e3); }
.dc-eswatch { display: inline-block; width: 14px; border-top: 2px solid; }
.dc-eswatch.dc-e0 { border-color: var(--e0); } .dc-eswatch.dc-e1 { border-color: var(--e1); } .dc-eswatch.dc-e2 { border-color: var(--e2); } .dc-eswatch.dc-e3 { border-color: var(--e3); }
.dc-eleg { margin-top: 2px; }
.dc-key-sig { border-radius: 50%; border: 1px solid color-mix(in oklab, var(--ink-2) 45%, transparent); background: color-mix(in oklab, var(--ink-2) 10%, transparent); }
.dc-advlist { font-size: .78rem; color: var(--ink-2); }
.dc-advlist ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.dc-advlist[hidden] { display: none; }
/* tableau vrai / estimé : un groupe par symbole, séparé du suivant par un trait plus marqué */
/* lignes du tableau : trait marqué entre deux symboles (aₗ, πₗ), trait fin entre aₗ et πₗ ;
   trait vertical fin entre la colonne « vrai » et les estimations */
.dc-table th, .dc-table td { border-bottom: 0; }
.dc-table thead th { border-bottom: 2px solid color-mix(in srgb, var(--ink) 45%, transparent); }
.dc-table tbody.dc-grp + tbody.dc-grp tr:first-child > * { border-top: 2px solid color-mix(in srgb, var(--ink) 30%, transparent); }
.dc-table tbody.dc-grp tr + tr > * { border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.dc-table tr > :nth-child(2) { border-inline-end: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); padding-inline-end: 10px; }
.dc-table tr > :nth-child(3) { padding-inline-start: 10px; }
.dc-table tbody.dc-grp:last-child tr:last-child > * { border-bottom: 2px solid color-mix(in srgb, var(--ink) 30%, transparent); }
.dc-pm { color: var(--ink-3); font-weight: 400; }
/* jusqu'à cinq symboles */
.fig-dc { --dc3: #b7791f; --dc4: #0e8a9a; }
:root[data-theme="dark"] .fig-dc { --dc3: #e8a13a; --dc4: #4cc3d1; }
.dc-true.dc-c3 { fill: var(--dc3); stroke: var(--dc3); } .dc-true.dc-c4 { fill: var(--dc4); stroke: var(--dc4); }
.dc-est.dc-c3 { stroke: var(--dc3); } .dc-est.dc-c4 { stroke: var(--dc4); }
.dc-sig.dc-c3 { fill: var(--dc3); stroke: var(--dc3); } .dc-sig.dc-c4 { fill: var(--dc4); stroke: var(--dc4); }
.dc-dot.dc-c3 { background: var(--dc3); } .dc-dot.dc-c4 { background: var(--dc4); }
/* symboles 6 à 10 */
.fig-dc { --dc5: #7b5bd6; --dc6: #c2408a; --dc7: #6b8e23; --dc8: #8b5a2b; --dc9: #56677a; }
:root[data-theme="dark"] .fig-dc { --dc5: #a48cf0; --dc6: #e57ab4; --dc7: #a3c45a; --dc8: #c99566; --dc9: #9aabbf; }
.dc-true.dc-c5 { fill: var(--dc5); stroke: var(--dc5); } .dc-true.dc-c6 { fill: var(--dc6); stroke: var(--dc6); } .dc-true.dc-c7 { fill: var(--dc7); stroke: var(--dc7); } .dc-true.dc-c8 { fill: var(--dc8); stroke: var(--dc8); } .dc-true.dc-c9 { fill: var(--dc9); stroke: var(--dc9); }
.dc-est.dc-c5 { stroke: var(--dc5); } .dc-est.dc-c6 { stroke: var(--dc6); } .dc-est.dc-c7 { stroke: var(--dc7); } .dc-est.dc-c8 { stroke: var(--dc8); } .dc-est.dc-c9 { stroke: var(--dc9); }
.dc-sig.dc-c5 { fill: var(--dc5); stroke: var(--dc5); } .dc-sig.dc-c6 { fill: var(--dc6); stroke: var(--dc6); } .dc-sig.dc-c7 { fill: var(--dc7); stroke: var(--dc7); } .dc-sig.dc-c8 { fill: var(--dc8); stroke: var(--dc8); } .dc-sig.dc-c9 { fill: var(--dc9); stroke: var(--dc9); }
.dc-dot.dc-c5 { background: var(--dc5); } .dc-dot.dc-c6 { background: var(--dc6); } .dc-dot.dc-c7 { background: var(--dc7); } .dc-dot.dc-c8 { background: var(--dc8); } .dc-dot.dc-c9 { background: var(--dc9); }
.dc-addrm { margin: 4px 0 0; display: flex; gap: 6px; }
/* zoom commun aux deux plans complexes, juste au-dessus d'eux */
.dc-zoomrow { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.dc-zoomlab { font-size: .75rem; color: var(--ink-2); }
.dc-zoom button { min-width: 24px; height: 24px; padding-inline: 5px; font-size: .78rem; }
.dc-addrm .kv-btn:disabled { opacity: .4; pointer-events: none; }
/* masses : fixée à la main (teinte d'accent) ou libre (partage automatique) ; somme ≠ 1 en rouge ; correction */
.dc-atab tr.is-fixed .dc-mass { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--accent-ink); }
.dc-atab .dc-pick { text-align: center; font-size: .7rem; color: var(--ink-3); }
.dc-atab:not(.is-fixing) .dc-pick { display: none; }
.dc-atab .dc-pick input { width: 16px; height: 16px; accent-color: var(--accent); }
.dc-msum { margin: 6px 0 0; max-width: 22rem; font-size: .72rem; line-height: 1.4; color: var(--ink-3); }
.dc-msum.is-bad { color: var(--reject, #d6453d); }
.dc-msum[hidden], .dc-fixbar[hidden], .dc-fix[hidden] { display: none; }
.dc-fix { border-color: color-mix(in srgb, var(--reject, #d6453d) 55%, transparent); color: var(--reject, #d6453d); }
.dc-fixbar { margin: 6px 0 0; display: flex; gap: 6px; }
/* le tableau défile de côté sur téléphone plutôt que de s'écraser */
.dc-tablewrap { overflow-x: auto; margin-top: 12px; }
.dc-tablewrap .dc-table { margin-top: 0; min-width: 440px; }
.dc-table caption { caption-side: top; text-align: start; padding-bottom: 6px; font-size: .72rem; color: var(--ink-3); }
@container (max-width: 480px) { .dc-grid { grid-template-columns: 1fr; } }
/* « en haut à gauche… » sur grand écran, « d'abord… puis… » sur téléphone, où les graphiques s'empilent */
.lay-narrow { display: none; }
@media (max-width: 639px) { .lay-wide { display: none; } .lay-narrow { display: inline; } }
.fig-dc .ht-prog { margin-top: 0; }
@container (max-width: 480px) { .dc-plots { grid-template-columns: 1fr; } }

/* téléphone : les figures sont repliées derrière un gros bouton ; ordinateur et tablette : toujours visibles */
.try-btn { display: none; }
@media (max-width: 639px) {
  .try-btn { display: flex; align-items: center; gap: 14px; width: 100%; margin-top: -8px; padding: 16px 18px; border-radius: 14px; background: var(--accent); color: var(--on-accent); text-align: start; box-shadow: 0 6px 18px -8px color-mix(in oklab, var(--accent) 70%, transparent); transition: transform var(--fast) var(--ease); }
  .try-btn:active { transform: scale(.98); }
  .try-btn > .icon { width: 22px; height: 22px; flex: none; }
  .try-txt { display: grid; gap: 2px; flex: 1; min-width: 0; }
  .try-txt b { font-size: 1.0625rem; font-weight: 600; }
  .try-txt span { font-size: .8125rem; opacity: .85; }
  .try-chev { width: 18px; height: 18px; flex: none; transition: transform var(--fast) var(--ease); }
  .try-btn[aria-expanded="true"] { background: var(--raised); color: var(--ink); box-shadow: none; }
  .try-btn[aria-expanded="true"] .try-chev { transform: rotate(180deg); }
  html:not(.fold-uf) .station .try-btn + .fig:not(.is-open) { display: none; }
  .station .try-btn + .fig.is-open { margin-top: 12px; }
}
/* index_V8 : figure repliée par hidden="until-found" (v1.js) : jamais display: none, sinon la recherche ne la trouve plus ;
   ni marge, ni bord, ni fond tant qu'elle est repliée (search-hidden-content) */
.station .try-btn + .fig[hidden="until-found"] { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; min-height: 0; }
/* site.css cache tout [hidden] par display: none !important ; ici, le navigateur doit garder la figure pour la recherche */
.station .fig[hidden="until-found"] { display: block !important; }

/* index_V8 : les sections lourdes, loin sous le premier écran, ne sont dessinées qu'en approchant (defer-rendering-heavy-content) ;
   la place réservée (mesurée à 375 et 1024 px de large) évite que la barre de défilement saute */
#curves, #signal, #publications, #talks, #about { content-visibility: auto; }
#curves { contain-intrinsic-size: auto none auto 2200px; }
#signal { contain-intrinsic-size: auto none auto 2600px; }
#publications { contain-intrinsic-size: auto none auto 1560px; }
#talks { contain-intrinsic-size: auto none auto 1430px; }
#about { contain-intrinsic-size: auto none auto 1850px; }
@media (max-width: 639px) {
  #curves { contain-intrinsic-size: auto none auto 1360px; }
  #signal { contain-intrinsic-size: auto none auto 1080px; }
  #publications { contain-intrinsic-size: auto none auto 1720px; }
  #talks { contain-intrinsic-size: auto none auto 2130px; }
  #about { contain-intrinsic-size: auto none auto 2270px; }
}

/* index_V8 : l'entrée du texte d'accueil, un élément après l'autre, quel que soit leur nombre (dynamic-sibling-animations ;
   les règles :nth-child de site.css restent pour les navigateurs sans sibling-index()) */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-delay: calc(sibling-index() * 0.1s)) {
    .hero-copy > :nth-child(n) { animation-delay: calc((sibling-index() - 1) * 80ms); }
  }
}

/* index_V8 : en attendant les polices du site, des polices du système mises à la même hauteur de minuscules
   (visually-stable-font-fallbacks) : le texte ne saute pas quand Plex et Newsreader arrivent.
   x-height mesurée : Plex Sans et Plex Mono 0,516 ; Newsreader 0,453 ; Segoe UI 0,500 ; Arial 0,519 ; Georgia 0,484 ; Consolas 0,500 */
@font-face { font-family: "Plex Sans fb Segoe"; src: local("Segoe UI"); size-adjust: 103.2%; }
@font-face { font-family: "Plex Sans fb Arial"; src: local("Arial"), local("ArialMT"); size-adjust: 99.4%; }
@font-face { font-family: "Newsreader fb"; src: local("Georgia"); size-adjust: 93.6%; }
@font-face { font-family: "Plex Mono fb"; src: local("Consolas"); size-adjust: 103.2%; }
:root {
  --serif: "Newsreader", "Newsreader fb", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --mono: "Plex Mono", "Plex Mono fb", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
/* la page arabe garde sa police (site.css, :lang(ar)) */
:root:not(:lang(ar)) { --sans: "Plex Sans", "Plex Sans fb Segoe", "Plex Sans fb Arial", system-ui, -apple-system, "Segoe UI", sans-serif; }

/* index_V8, page arabe : les dessins (carte des domaines, graphiques) gardent l'ancrage de leurs textes,
   pensé de gauche à droite ; le texte arabe s'y écrit toujours de droite à gauche */
[dir="rtl"] svg { direction: ltr; }

/* index_V8 : « δ = 5 % » ne se coupe pas en fin de ligne */
.nobr { white-space: nowrap; }

/* index_V8 : cases, curseurs et barres natives prennent la couleur d'accent de la zone (browser-ui-theming) */
:root, [class*="tone-"] { accent-color: var(--accent); }

@media (max-width: 820px) {
  .intro-grid { grid-template-columns: minmax(0, 1fr); }
  .intro-grid > h2, .intro-grid > .lead, .intro-grid > .station-nav { grid-column: 1; }
  .venn-fig { grid-column: 1; grid-row: auto; margin-top: 28px; min-width: 0; }
  /* le dessin est réduit de moitié environ : on grossit les textes d'autant */
  .venn .v-name { font-size: 18px; }
  .venn .v-pair { font-size: 16px; }
  .venn .v-in { font-size: 14px; }
  .venn .v-center { font-size: 21px; }
}

/* index_V5 : note éphémère des gros calculs, en bas de l'écran */
.heavy-note { position: fixed; z-index: 60; left: 50%; bottom: 20px; max-width: min(440px, calc(100vw - 32px)); padding: 10px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--raised); color: var(--ink-2); font-size: .8rem; line-height: 1.45; box-shadow: 0 8px 24px -10px rgb(0 0 0 / .35); opacity: 0; transform: translate(-50%, 8px); pointer-events: none; transition: opacity 400ms ease, transform 400ms ease; cursor: pointer; }
.heavy-note.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .heavy-note { transition: none; } }

/* index_V5 : « Relancer le panneau », en bas à droite de chaque figure (panel-reset.js). L'icône marche / arrêt
   esquisse un quart de tour au survol, fait un tour complet pendant la relance ; la figure s'éteint un instant
   puis revient. */
.fig-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 12px; margin-inline-start: auto; }
.fig-foot .fig-btns .btn-quiet { margin-inline-start: 0; }
.fig-reboot { justify-content: center; }
.fig-reboot .i-reboot { transition: transform 300ms var(--ease); }
.fig-reboot:hover .i-reboot, .fig-reboot:focus-visible .i-reboot { transform: rotate(-35deg); }
.fig-reboot.is-spin-a .i-reboot { animation: reboot-a 240ms cubic-bezier(.5, 0, .9, .4) forwards; }
.fig-reboot.is-spin-b .i-reboot { animation: reboot-b 560ms var(--ease); }
@keyframes reboot-a { from { transform: rotate(0); } to { transform: rotate(200deg); } }
@keyframes reboot-b { from { transform: rotate(200deg); } to { transform: rotate(360deg); } }
.fig.is-rebooting > * { opacity: .25; filter: saturate(.4); transition: opacity 220ms ease, filter 220ms ease; }
.fig.is-rebooting .fig-foot { opacity: 1; filter: none; }
.fig.is-reborn > * { animation: reborn 420ms var(--ease); }
.fig.is-reborn .fig-foot { animation: none; }
@keyframes reborn { from { opacity: .25; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .fig-reboot .i-reboot, .fig-reboot.is-spin-a .i-reboot, .fig-reboot.is-spin-b .i-reboot { animation: none; transition: none; transform: none; }
  .fig.is-rebooting > *, .fig.is-reborn > * { animation: none; transition: none; }
}

/* index_V6 : « Lancer le calcul » (panel-reset.js). Un réglage a changé : les graphiques s'estompent, et une pastille
   monte en bas de la figure ; elle colle au bas de l'écran tant que la figure est visible. Le triangle prend son élan
   au départ du calcul. */
.run-gate { position: sticky; bottom: 14px; z-index: 6; display: flex; justify-content: center; margin-top: 14px; pointer-events: none; }
.run-gate[hidden] { display: none; }
.run-gate > * { pointer-events: auto; }
.run-gate { animation: gate-in 320ms var(--ease); }
.run-msg { align-self: center; margin-inline-end: -14px; padding: 8px 26px 8px 14px; border: 1px solid var(--line-2); border-inline-end: 0; border-radius: 999px 0 0 999px; background: var(--raised); font-size: .78rem; color: var(--ink-2); box-shadow: 0 8px 22px -12px rgb(0 0 0 / .4); }
.run-msg.is-bad { color: var(--reject, #d6453d); }
.run-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 18px 0 14px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: .875rem; font-weight: 600; box-shadow: 0 8px 22px -10px color-mix(in oklab, var(--accent) 80%, transparent); transition: transform var(--fast) var(--ease), filter var(--fast) var(--ease); }
.run-btn .i-play { width: 16px; height: 16px; transition: transform 260ms cubic-bezier(.5, -.4, .6, 1.4); }
.run-btn:hover { filter: brightness(1.06); }
.run-btn:hover .i-play { transform: translateX(2px); }
.run-btn:active { transform: scale(.97); }
.run-btn:disabled { background: var(--raised); color: var(--ink-3); box-shadow: none; cursor: not-allowed; }
/* un halo qui respire doucement autour du bouton, tant qu'il attend */
.run-btn:not(:disabled)::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 2px solid var(--accent); opacity: 0; animation: gate-breathe 2.2s ease-out infinite; pointer-events: none; }
.run-gate.is-go .i-play { transform: translateX(7px) scale(1.2); }
.run-gate.is-go { opacity: 0; transform: translateY(6px); transition: opacity 240ms ease 60ms, transform 240ms ease 60ms; }
@keyframes gate-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes gate-breathe { 0% { opacity: .55; transform: scale(.96); } 70%, 100% { opacity: 0; transform: scale(1.12); } }
/* les résultats affichés ne correspondent plus aux réglages : on les estompe */
.fig.is-stale :is(.ht-plot, .fn-plot, .dc-plot, .legend, .fn-leg, .dc-leg, .dc-tablewrap, .ht-chips) { opacity: .42; filter: saturate(.5); transition: opacity 260ms ease, filter 260ms ease; }
@media (prefers-reduced-motion: reduce) { .run-gate, .run-btn::after { animation: none !important; } .run-gate.is-go { transition: none; } }

/* index_V7 : la disponibilité, en pastille au-dessus du nom ; un point vert qui bat doucement, comme un statut « en ligne » */
.avail { margin: 0 0 18px; }
.avail a { display: inline-flex; align-items: center; gap: 9px; padding: 6px 14px 6px 11px; border: 1px solid color-mix(in oklab, #2f9e6a 45%, transparent); border-radius: 999px; background: color-mix(in oklab, #2f9e6a 10%, transparent); color: var(--ink); font-size: .8125rem; font-weight: 500; text-decoration: none; transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease); }
.avail a:hover { background: color-mix(in oklab, #2f9e6a 18%, transparent); border-color: #2f9e6a; }
.avail-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #2f9e6a; flex: none; }
.avail-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #2f9e6a; opacity: 0; animation: avail-beat 2.4s ease-out infinite; }
@keyframes avail-beat { 0% { opacity: .6; transform: scale(.6); } 80%, 100% { opacity: 0; transform: scale(1.5); } }
@media (prefers-reduced-motion: reduce) { .avail-dot::after { animation: none; } }
/* téléphone : une rosace plus petite, pour que le nom, la phrase et les boutons tiennent dans le premier écran */
@media (max-width: 639px) { .hero-figure { max-width: min(46vw, 190px); } }
/* cibles de toucher : l'astérisque des co-auteurs et les raccourcis des cinq terrains */
.fn-ref { display: inline-block; padding: 4px 5px; margin: -4px -3px; }
.station-nav a { display: inline-block; padding-block: 6px; }

/* index_V7 : la rosace de l'accueil se touche (rosette.js) : elle éclate et se reconstruit */
.hero-figure[role="button"] { cursor: pointer; border-radius: 50%; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.hero-figure[role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 8px; }

/* index_V6 : flèches de défilement dessinées, toutes du même trait */
.ht-zoom .z-arr { width: 13px; height: 13px; display: block; margin: auto; }

/* index_V6 : coefficients du canal (figure 5), une case par coefficient, son nom au-dessus */
.dc-coef { margin-top: 8px; }
.dc-coef .ht-note { margin: 0 0 8px; }
.dc-crow { display: flex; flex-wrap: wrap; align-items: end; gap: 6px 12px; margin-top: 6px; }
.dc-clab { min-width: 7.5rem; font-size: .78rem; color: var(--ink-2); padding-bottom: 6px; }
.dc-cells { display: flex; flex-wrap: wrap; gap: 6px; }
.dc-cell { display: grid; gap: 2px; justify-items: center; font: 400 .7rem var(--mono); color: var(--ink-3); }
.dc-cell .ht-num { width: 4.4em; text-align: center; }
.dc-caddrm { display: flex; gap: 6px; align-self: end; }
.dc-caddrm .kv-btn { min-height: 28px; font-family: var(--mono); }
.dc-caddrm .kv-btn:disabled { opacity: .4; pointer-events: none; }
.dc-cmsg { margin: 8px 0 0; font-size: .74rem; line-height: 1.45; color: var(--ink-3); }
.dc-cmsg.is-bad { color: var(--reject, #d6453d); }
.dc-cback { margin: 6px 0 0; }

/* index_V9 : le logo de la barre du haut : chacun des deux carrés tourne autour du centre (v1.js) */
.nav .mark .mk-a, .nav .mark .mk-b { transform-box: fill-box; transform-origin: center; }

/* index_V9 : « Le vivant », comment je m'y prends : SELEX, RBM, géométrie */
.rbm-steps { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rbm-steps li { display: grid; grid-template-rows: 52px auto auto; align-content: start; gap: 4px; font-size: .875rem; color: var(--ink-2); }
.rbm-steps b { font-weight: 600; color: var(--ink); }
.rbm-steps svg { align-self: center; color: var(--ink-2); }
.rbm-ico { width: 40px; height: 40px; }
.rbm-net { width: 92px; height: 54px; }
.rbm-net line { stroke: currentColor; stroke-width: .7; opacity: .35; }
.rbm-net .rbm-h { fill: var(--accent); }
.rbm-net .rbm-v { fill: var(--surface, transparent); stroke: currentColor; stroke-width: 1; }
.rbm-net text { font: 600 9px var(--mono); fill: currentColor; text-anchor: middle; }
@media (max-width: 639px) {
  .rbm-steps { grid-template-columns: 1fr; }
  .rbm-steps li { grid-template-columns: 96px 1fr; grid-template-rows: auto auto; column-gap: 12px; }
  .rbm-steps svg { grid-row: 1 / 3; justify-self: center; }
}

/* index_V9 : déconvolution : « Voir les détails », une fois la courbe finie */
.dc-sum { margin-top: 4px; }
.dc-sum .ht-more { margin-top: 6px; }

/* index_V9 : pied de page : la version précédente, discrète */
.footer-old { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; }
.footer-old:hover { text-decoration-color: currentColor; }

/* index_V9 : page arabe : passer de la phrase arabe à la phrase anglaise */
.pos-swap { padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .75rem; color: var(--ink-2); background: transparent; }
.pos-swap:hover { color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.pos-top .pos-tools { display: flex; align-items: center; gap: 8px; }


/* index_V9 : à côté du bouton « Télécharger le CV », le lien vers le CV détaillé */
.actions .cv-full { align-self: center; padding: 0 4px; font-size: .9375rem; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.actions .cv-full:hover { color: var(--ink); text-decoration-color: currentColor; }

/* index_V9_bis : la vidéo de l'exposé en fond de la section Exposés, sous la carte du mini-cours (le visage
   reste dégagé), fondue vers le texte */
.talks.has-film { position: relative; overflow: hidden; isolation: isolate; }
.talks.has-film > .wrap { position: relative; z-index: 1; }
.talk-film { position: absolute; z-index: 0; inset-block: auto 0; inset-inline-end: 0; height: 72%; width: min(52%, 760px); pointer-events: none;
  -webkit-mask-image: linear-gradient(to left, #000 35%, transparent 95%), linear-gradient(to bottom, transparent, #000 15%); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to left, #000 35%, transparent 95%), linear-gradient(to bottom, transparent, #000 15%); mask-composite: intersect; opacity: .55; }
[dir="rtl"] .talk-film { -webkit-mask-image: linear-gradient(to right, #000 35%, transparent 95%), linear-gradient(to bottom, transparent, #000 15%);
  mask-image: linear-gradient(to right, #000 35%, transparent 95%), linear-gradient(to bottom, transparent, #000 15%); }
.talk-film img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 20%; }
:root[data-theme="dark"] .talk-film { opacity: .4; }
@media (max-width: 639px) {
  .talk-film { width: 100%; height: 55%; opacity: .42;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 70%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 70%, transparent); }
}


/* index_V10 : moins de vide au-dessus de « Cinq terrains », et des titres de publications sur toute la largeur utile */
.intro { padding-block-start: clamp(48px, 6vw, 80px); }
.pub-title { max-width: 54ch; }
