/* Nazim Allaoua — portfolio. Mêmes couleurs que le CV : bleu marine, blanc, gris clair. */

:root {
  --navy: #1b3a5c;
  --navy-2: #2e5f8a;
  --sky: #eef2f7;
  --ink: #16202b;
  --grey: #5f6b78;
  --line: #d5dde6;
  --blue: #1b4f9c;   /* graphiques : série principale */
  --hot: #e4572e;    /* graphiques : ce qui pose problème */
  --light: #3f93da;  /* graphiques : série secondaire */
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--hot); outline-offset: 3px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* ---------- Barre du haut ---------- */
.top { background: var(--navy); color: #fff; }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.top .name { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; text-decoration: none; margin-right: auto; white-space: nowrap; }
.top nav { display: flex; gap: 26px; }
.top nav a { text-decoration: none; font-size: 15px; font-weight: 500; opacity: .8; }
.top nav a:hover { opacity: 1; }
.lang { display: flex; border: 1px solid rgba(255, 255, 255, .35); }
.lang button { font: inherit; font-size: 13px; font-weight: 600; background: none; border: 0; color: #fff; padding: 5px 9px; cursor: pointer; opacity: .7; }
.lang button[aria-pressed="true"] { background: #fff; color: var(--navy); opacity: 1; }

/* ---------- Accueil : grand bloc d'ouverture ---------- */
.hero { background: var(--navy); color: #fff; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: end; padding-top: 56px; }
.hero .text { padding-bottom: 72px; }
.hero h1 { font-size: clamp(64px, 10.5vw, 158px); font-weight: 800; line-height: .86; letter-spacing: -0.045em; text-transform: uppercase; }
.hero .role { font-size: clamp(22px, 2.6vw, 34px); font-weight: 600; letter-spacing: -0.01em; margin-top: 30px; }
.hero .role span { opacity: .6; font-weight: 400; }
.hero .about { font-size: 18px; max-width: 34em; margin-top: 18px; opacity: .85; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; margin-top: 34px; }
.hero img { width: 100%; }
.btn { display: inline-block; background: #fff; color: var(--navy); font-weight: 700; font-size: 16px; text-decoration: none; padding: 14px 22px; border: 0; font-family: inherit; cursor: pointer; }
.btn:hover { background: var(--hot); color: #fff; }
.btn.dark { background: var(--navy); color: #fff; }
.btn.dark:hover { background: var(--hot); }
.btn:disabled { opacity: .4; cursor: default; }
.hero .mail { color: #fff; font-weight: 500; text-underline-offset: 5px; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-bottom: 3px solid var(--navy); padding-bottom: 14px; margin-bottom: 36px; }
.section-title h2 { font-size: clamp(38px, 5vw, 64px); font-weight: 800; letter-spacing: -0.035em; line-height: 1; color: var(--navy); text-transform: uppercase; }
.section-title p { color: var(--grey); font-size: 16px; max-width: 30em; }

/* Projets : six vignettes, chacune est une vraie capture du tableau de bord */
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px; }
.project { text-decoration: none; display: block; }
.project .shot { border: 1px solid var(--line); background: var(--sky); aspect-ratio: 16 / 10; overflow: hidden; }
.project .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .3s ease; }
.project:hover .shot { border-color: var(--navy); }
.project:hover .shot img { transform: scale(1.03); }
.project .meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 12px; margin-top: 14px; }
.project .no { font-weight: 800; color: var(--hot); font-size: 15px; padding-top: 4px; font-variant-numeric: tabular-nums; }
.project h3 { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: var(--navy); }
.project:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
.project p { grid-column: 2; color: var(--grey); font-size: 15px; margin-top: 4px; }

/* Parcours : lignes de tableau, année à gauche */
.cv-block + .cv-block { margin-top: 56px; }
.cv-block > h3 { font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); margin-bottom: 6px; }
.row { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1.25fr); gap: 28px; padding: 22px 0; border-top: 1px solid var(--line); }
.row .year { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.row h4 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; color: var(--navy); }
.row .org { color: var(--grey); font-size: 15px; margin-top: 4px; }
.row ul li { position: relative; padding-left: 16px; font-size: 16px; }
.row ul li + li { margin-top: 5px; }
.row ul li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 2px; background: var(--navy); }
.row .note { font-size: 16px; }
.row .note em { font-style: normal; color: var(--grey); }
.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; border-top: 1px solid var(--line); }
.skills div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.skills h4 { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--navy); }
.skills p { font-size: 15px; color: var(--grey); }

/* Contact */
.contact { background: var(--navy); color: #fff; padding: 88px 0 40px; }
.contact .label { font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .6; }
.contact .big { display: inline-block; font-size: clamp(26px, 5.2vw, 76px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; text-decoration: none; margin-top: 12px; overflow-wrap: anywhere; }
.contact .big:hover { color: var(--hot); }
.contact .more { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 28px; font-size: 17px; }
.contact .more a { text-underline-offset: 5px; }
.contact .foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 72px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .2); font-size: 14px; opacity: .7; }
.contact.slim { padding: 0 0 28px; }
.contact.slim .foot { margin-top: 0; border-top: 0; padding-top: 28px; }

/* ---------- Page projet ---------- */
.tabs { background: var(--navy); border-top: 1px solid rgba(255, 255, 255, .16); }
.tabs .wrap { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; }
.tabs .wrap::-webkit-scrollbar { display: none; }
.tabs a { color: #fff; text-decoration: none; font-size: 15px; font-weight: 600; padding: 14px 18px 12px; border-bottom: 3px solid transparent; white-space: nowrap; opacity: .65; }
.tabs a:first-child { padding-left: 0; }
.tabs a b { font-weight: 800; margin-right: 7px; font-variant-numeric: tabular-nums; }
.tabs a:hover { opacity: 1; }
.tabs a[aria-current="page"] { opacity: 1; border-bottom-color: var(--hot); }

.p-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 40px; align-items: end; padding: 44px 0 26px; }
.p-head h1 { font-size: clamp(44px, 6.5vw, 88px); font-weight: 800; letter-spacing: -0.04em; line-height: .92; text-transform: uppercase; color: var(--navy); }
.p-head .what { font-size: 20px; max-width: 34em; margin-top: 16px; }
.p-head .fake { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); border: 1px solid var(--line); padding: 6px 10px; white-space: nowrap; }

.dash { background: var(--sky); padding: 20px; }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; font-size: 15px; }
.controls .lab { font-weight: 600; color: var(--navy); }
.seg { display: flex; flex-wrap: wrap; }
.seg button { font: inherit; font-size: 14px; font-weight: 600; background: #fff; color: var(--navy); border: 1px solid var(--navy); padding: 8px 14px; cursor: pointer; margin-left: -1px; }
.seg button:first-child { margin-left: 0; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.controls select { font: inherit; font-size: 14px; font-weight: 600; color: var(--navy); background: #fff; border: 1px solid var(--navy); border-radius: 0; padding: 8px 10px; max-width: 100%; }
.controls input[type="range"] { accent-color: var(--navy); width: min(320px, 100%); }
.controls .hint { color: var(--grey); font-size: 14px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.kpi { background: #fff; padding: 16px 18px 14px; min-width: 0; }
.kpi span { display: block; font-size: 13px; font-weight: 600; color: var(--grey); }
.kpi b { display: block; font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: var(--navy); margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi b.hot { color: var(--hot); }
.kpi small { display: block; font-size: 13px; color: var(--grey); margin-top: 2px; }

.grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 12px; }
.panel { background: #fff; padding: 16px 18px 18px; min-width: 0; display: flex; flex-direction: column; }
.panel.big { grid-row: span 2; }
.panel h2 { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.panel h2 small { font-weight: 400; color: var(--grey); font-size: 13px; margin-left: 6px; }
.panel .chart { position: relative; flex: 1; min-height: 300px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--grey); margin: -4px 0 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; background: var(--blue); }
.legend i.hot { background: var(--hot); }
.legend i.light { background: var(--light); }
.legend i.dot { border-radius: 50%; }
.legend i.grey { background: #9aa6b2; }

/* Barres horizontales en HTML */
.bars { display: grid; gap: 7px; font-size: 13.5px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 10px; align-items: center; }
.bar-row .lbl { text-align: right; color: var(--ink); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .track { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bar-row .fill { height: 16px; background: var(--blue); min-width: 2px; flex: 0 0 auto; transition: width .3s ease; }
.bar-row .fill.hot { background: var(--hot); }
.bar-row .fill.light { background: var(--light); }
.bar-row .fill.grey { background: #b6c0cb; }
.bar-row .val { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar-row.hi .lbl { font-weight: 700; }
.diverge .bar-row .track { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.diverge .neg, .diverge .pos { display: flex; align-items: center; gap: 6px; min-width: 0; }
.diverge .neg { justify-content: flex-end; border-right: 1px solid var(--ink); }
.diverge .neg .fill { background: var(--hot); }

/* Carte de chaleur compacte */
.heat { display: grid; grid-template-columns: 30px repeat(11, minmax(0, 1fr)); gap: 2px; font-size: 11px; color: var(--grey); }
.heat .h { text-align: center; }
.heat .d { display: flex; align-items: center; }
.heat .c { height: 20px; }

/* Petites tables */
.table-scroll { overflow-x: auto; }
.rows { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.rows th { text-align: left; font-weight: 600; color: var(--grey); font-size: 12.5px; padding: 0 10px 6px 0; border-bottom: 2px solid var(--navy); white-space: nowrap; }
.rows td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.rows .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rows.mono td, .rows.mono th { font-family: var(--mono); font-size: 12px; white-space: nowrap; }

/* Requête SQL repliée */
.code { margin: 20px 0 72px; border: 1px solid var(--line); }
.code summary { cursor: pointer; padding: 14px 18px; font-weight: 600; color: var(--navy); font-size: 15px; }
.code pre { margin: 0; padding: 4px 18px 18px; overflow-x: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; }
.code pre code, .code pre code.hljs { background: none; padding: 0; font-family: inherit; }

/* ---------- Page du mémoire ---------- */
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 7px; margin-right: 8px; vertical-align: 1px; white-space: nowrap; }
.tag.local { background: var(--navy); color: #fff; }
.tag.ai { background: var(--hot); color: #fff; }
.ai-view li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 10px; }
.ai-view li:last-child { border-bottom: 0; }
.ai-view code { font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.ai-view span { color: var(--grey); }
.steps { counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 22px auto minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.steps li:last-child { border-bottom: 0; }
.steps li::before { content: counter(s); font-weight: 800; color: var(--grey); font-variant-numeric: tabular-nums; }
.steps li .tag { margin: 0; }
.steps li.waiting { opacity: .4; }
.steps li.running .t::after { content: " …"; }
.steps .t { font-weight: 600; }
.steps .d { color: var(--grey); }
.steps .d b { color: var(--ink); }
.mini-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.mini-charts .chart { min-height: 200px; }
.empty { color: var(--grey); font-size: 14px; margin: auto; text-align: center; padding: 30px 10px; }

/* ---------- Mobile ---------- */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; }
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { grid-template-columns: 110px minmax(0, 1fr); }
  .row > :last-child { grid-column: 2; }
  .grid { grid-template-columns: 1fr; }
  .panel.big { grid-row: auto; }
  .mini-charts { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .top .wrap { gap: 16px; height: 56px; }
  .top nav { gap: 16px; }
  .top nav .opt { display: none; }
  .hero .wrap { grid-template-columns: 1fr; padding-top: 36px; gap: 0; }
  .hero .text { padding-bottom: 36px; }
  .hero figure { width: 62%; margin-left: auto; }
  .section { padding: 56px 0; }
  .projects { grid-template-columns: 1fr; gap: 32px; }
  .row { grid-template-columns: 1fr; gap: 8px; }
  .row > :last-child { grid-column: 1; }
  .skills { grid-template-columns: 1fr; }
  .p-head { grid-template-columns: 1fr; padding-top: 30px; }
  .p-head .fake { justify-self: start; }
  .p-head .what { font-size: 17px; }
  .dash { padding: 12px; margin: 0 -18px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .grid { gap: 8px; }
  .panel .chart { min-height: 240px; }
  .bar-row { grid-template-columns: minmax(0, 118px) minmax(0, 1fr); }
  .bar-row .lbl { white-space: normal; text-align: left; }
  .ai-view li { grid-template-columns: 1fr; gap: 0; }
  .steps li { grid-template-columns: 18px minmax(0, 1fr); }
  .steps li .d { grid-column: 2; }
  .steps li .t { grid-column: 2; }
  .steps li .tag { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ====================================================================
   Troisième version : quatre projets, un par savoir-faire
   ==================================================================== */
:root { --good: #1f8a70; }
.p-head h1 { font-size: clamp(36px, 5vw, 62px); text-transform: none; letter-spacing: -0.035em; line-height: 1; }
.p-head .skills-line { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--hot); margin-bottom: 14px; }
.p-head .what { font-size: 19px; max-width: 38em; }
.panel .chart { min-height: 250px; }

/* Rapport façon Power BI */
.report-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 20px; margin-bottom: 14px; font-size: 14px; color: var(--grey); }
.report-bar strong { color: var(--navy); font-size: 15px; margin-right: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { font: inherit; font-size: 13px; font-weight: 600; background: var(--navy); color: #fff; border: 0; padding: 6px 10px; cursor: pointer; }
.chip span { margin-left: 6px; opacity: .7; }
.chip:hover { background: var(--hot); }
.kpi.with-spark { position: relative; }
.kpi.with-spark svg { position: absolute; top: 14px; right: 16px; width: 76px; height: 26px; }
.kpi .delta { font-weight: 600; color: var(--grey); margin-top: 4px; }
.kpi .delta span { font-weight: 400; }
.kpi .delta.bad { color: var(--hot); }
.kpi .delta.good { color: var(--good); }
.kpi .delta.bad span, .kpi .delta.good span { color: var(--grey); }
.legend i.dash-line { height: 0; width: 14px; background: none; border-top: 2px dashed #9aa6b2; vertical-align: 3px; }
.bars.pick { gap: 2px; }
.bars.pick .bar-row { font: inherit; background: none; border: 0; padding: 4px 0; cursor: pointer; width: 100%; text-align: left; transition: opacity .15s; }
.bars.pick .bar-row:hover { background: var(--sky); }
.bars.pick .bar-row.dim { opacity: .32; }
.bars.pick .bar-row[aria-pressed="true"] .lbl { font-weight: 700; }
.bar-row .val i { font-style: normal; font-weight: 400; color: var(--grey); margin-left: 4px; }
.rows.matrix td { vertical-align: middle; padding-top: 6px; padding-bottom: 6px; }
.cellbar { display: block; position: relative; padding: 2px 6px; font-variant-numeric: tabular-nums; white-space: nowrap; z-index: 0; min-width: 120px; }
.cellbar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: #d3deee; z-index: -1; }
.heatcell { display: inline-block; min-width: 46px; padding: 2px 6px; text-align: right; }
.code pre { white-space: pre; }

@media (max-width: 680px) {
  .kpi.with-spark svg { display: none; }
}

/* SQL en direct */
.sql-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 12px; align-items: start; }
.sql-side, .sql-main { display: grid; gap: 12px; min-width: 0; }
.q-list { display: grid; gap: 2px; }
.q-list button { font: inherit; text-align: left; background: none; border: 0; border-left: 3px solid transparent; padding: 9px 10px; cursor: pointer; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; font-size: 14.5px; line-height: 1.3; color: var(--ink); }
.q-list button b { color: var(--grey); font-weight: 800; }
.q-list button small { display: block; color: var(--grey); font-size: 12.5px; margin-top: 3px; }
.q-list button:hover { background: var(--sky); }
.q-list button[aria-pressed="true"] { border-left-color: var(--hot); background: var(--sky); font-weight: 600; }
.q-list button[aria-pressed="true"] b { color: var(--hot); }
.q-list button[aria-pressed="true"] small { font-weight: 400; }
.schema { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; font-family: var(--mono); font-size: 11.5px; align-items: start; }
.schema .dims { display: grid; gap: 10px; }
.tbl { border: 1px solid var(--line); display: grid; }
.tbl.fact { border-color: var(--navy); }
.tbl b { background: var(--sky); padding: 5px 8px; font-weight: 700; color: var(--navy); }
.tbl.fact b { background: var(--navy); color: #fff; }
.tbl span { padding: 2px 8px; }
.tbl span:last-child { padding-bottom: 6px; }
.tbl .pk::after { content: " PK"; color: var(--hot); font-weight: 700; }
.tbl .fk::after { content: " FK"; color: var(--navy-2); font-weight: 700; }
.editor-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.editor-head h2 { margin: 0; font-size: 17px; }
.editor-head .btn { padding: 9px 16px; font-size: 14px; white-space: nowrap; }
.editor { width: 100%; font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--ink); background: #f8fafc; border: 1px solid var(--line); padding: 14px 16px; resize: vertical; tab-size: 4; white-space: pre; overflow: auto; border-radius: 0; }
.editor:focus { outline: 2px solid var(--navy); outline-offset: -1px; }
.editor-hint { font-size: 13px; color: var(--grey); margin-top: 8px; }
.result { max-height: 420px; overflow: auto; }
.result .rows th { position: sticky; top: 0; background: #fff; font-family: var(--mono); font-size: 12px; padding-top: 2px; }
.result .rows td { padding-top: 6px; padding-bottom: 6px; }
.rows th.num { text-align: right; }
.null { color: #9aa6b2; font-family: var(--mono); font-size: 12px; }
.sql-error { color: var(--hot); font-weight: 600; }
@media (max-width: 980px) { .sql-layout { grid-template-columns: 1fr; } .sql-main { order: -1; } }

/* Nettoyage façon Power Query */
.pq-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 12px; align-items: start; }
.applied { counter-reset: st; display: grid; gap: 1px; }
.applied button { font: inherit; font-size: 14px; width: 100%; text-align: left; background: none; border: 0; border-left: 3px solid transparent; padding: 8px 10px 8px 34px; cursor: pointer; position: relative; line-height: 1.3; color: var(--ink); }
.applied li { counter-increment: st; }
.applied button::before { content: counter(st); position: absolute; left: 10px; font-weight: 800; color: var(--grey); font-size: 13px; }
.applied button:hover { background: var(--sky); }
.applied button.later { color: #9aa6b2; }
.applied button[aria-pressed="true"] { background: var(--sky); border-left-color: var(--hot); font-weight: 600; }
.applied button[aria-pressed="true"]::before { color: var(--hot); }
.pq-nav { display: flex; gap: 8px; margin-top: 16px; }
.pq-nav .btn { flex: 1; padding: 10px 8px; font-size: 14px; text-align: center; }
.btn.ghost { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.btn.ghost:hover { background: var(--navy); color: #fff; }
.formula { display: grid; grid-template-columns: auto minmax(0, 1fr); border: 1px solid var(--line); margin-bottom: 14px; background: #f8fafc; }
.formula > span { padding: 10px 12px; font-style: italic; font-weight: 700; color: var(--grey); border-right: 1px solid var(--line); font-family: Georgia, serif; }
.formula pre { margin: 0; padding: 10px 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; overflow-x: auto; min-height: 5.8em; }
.rows.pq { font-size: 13px; }
.rows.pq th { background: var(--sky); padding: 7px 10px; border-bottom: 2px solid var(--navy); color: var(--navy); }
.rows.pq th i { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--grey); margin-right: 7px; font-weight: 400; }
.rows.pq td { padding: 5px 10px; white-space: nowrap; border-right: 1px solid #eef1f5; height: 29px; transition: background .25s; }
.rows.pq td.changed { background: #fde3d9; }
.rows.pq td.bad { color: var(--hot); font-weight: 700; }
.pq-note { font-size: 14.5px; color: var(--ink); margin-top: 14px; max-width: 46em; }
@media (max-width: 980px) { .pq-layout { grid-template-columns: 1fr; } }

/* Contrôle des factures */
.range-value { color: var(--navy); font-size: 16px; font-variant-numeric: tabular-nums; min-width: 3.5em; }
.split { display: flex; gap: 2px; height: 44px; }
.split button { border: 0; padding: 0; min-width: 6px; color: #fff; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; transition: opacity .15s; overflow: hidden; }
.split button:disabled { cursor: default; }
.split button.dim { opacity: .28; }
.split button:not(:disabled):hover { filter: brightness(1.12); }
.split-legend { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13.5px; color: var(--grey); margin-top: 12px; }
.split-legend i, .reason i { display: inline-block; width: 10px; height: 10px; margin-right: 7px; }
.split-legend b { color: var(--ink); margin-left: 3px; }
.reason { white-space: nowrap; }
.linklike { font: inherit; background: none; border: 0; padding: 0; color: var(--navy); text-decoration: underline; cursor: pointer; }
.dash > .panel { display: block; }
.rows.pq { font-size: 12.5px; }
.rows.pq td { padding: 5px 8px; }
.rows.pq th { padding: 7px 8px; }
.pq-layout { grid-template-columns: 280px minmax(0, 1fr); }

/* Accueil : quatre projets sur deux colonnes */
.projects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; }
.project h3 { font-size: 27px; }
.project p { font-size: 16px; }
.project .skills-line { grid-column: 2; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--hot); margin-top: 8px; }
.project .no { font-size: 17px; padding-top: 6px; }
@media (max-width: 680px) { .projects { grid-template-columns: 1fr; } .project h3 { font-size: 23px; } }
.tabs { overflow: hidden; }
.bars.pick .bar-row { grid-template-columns: minmax(0, 178px) minmax(0, 1fr); }
@media (max-width: 680px) { .bars.pick .bar-row { grid-template-columns: minmax(0, 118px) minmax(0, 1fr); } }

/* ====================================================================
   Mouvement : ouverture animée, bandeau, aperçus des projets, apparitions
   ==================================================================== */
@view-transition { navigation: auto; }
.top { position: sticky; top: 0; z-index: 30; }

/* Ouverture */
.hero { position: relative; min-height: min(calc(100svh - 64px), 860px); display: flex; align-items: center; }
.hero #field { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .wrap { position: relative; display: block; width: 100%; padding-top: 40px; padding-bottom: 72px; pointer-events: none; }
.hero .wrap a { pointer-events: auto; }
.hero h1 { font-size: clamp(64px, 11.2vw, 178px); }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero h1 .line > span { display: block; transform: translateY(105%); animation: line-up .95s cubic-bezier(.2, .8, .2, 1) forwards; }
.hero h1 .line:nth-child(2) > span { animation-delay: .12s; }
@keyframes line-up { to { transform: none; } }
.rise { opacity: 0; transform: translateY(18px); animation: rise .8s cubic-bezier(.2, .8, .2, 1) .55s forwards; }
.cta.rise { animation-delay: .7s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.btn .arrow { display: inline-block; margin-left: 6px; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }
.field-label { position: absolute; left: 32px; bottom: 26px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .55); display: flex; gap: 14px; }
.field-label span:first-child { color: var(--hot); }

/* Bandeau de compétences */
.ticker { background: var(--hot); color: #fff; overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-flex; animation: ticker 38s linear infinite; padding: 15px 0; }
.ticker-track span { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; padding: 0 26px; position: relative; }
.ticker-track span::after { content: ""; position: absolute; right: -4px; top: 50%; width: 7px; height: 7px; background: var(--navy); transform: translateY(-50%) rotate(45deg); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Présentation : photo + phrase qui s'allume */
.about { padding: 110px 0 30px; }
.about .wrap { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 72px; align-items: center; }
.about img { width: 100%; }
.statement { font-size: clamp(24px, 3.1vw, 42px); font-weight: 600; line-height: 1.22; letter-spacing: -0.025em; color: var(--navy); }
.statement span { opacity: .16; transition: opacity .35s ease; }
.statement span.on { opacity: 1; }

/* Apparitions au défilement */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.about figure.reveal { transform: none; opacity: 1; }
.about figure.reveal img { clip-path: inset(0 0 100% 0); transform: scale(1.08); transition: clip-path 1.1s cubic-bezier(.2, .8, .2, 1), transform 1.4s cubic-bezier(.2, .8, .2, 1); }
.about figure.reveal.in img { clip-path: inset(0); transform: none; }

/* Projets : grande ligne par projet, avec un aperçu animé */
.case { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; text-decoration: none; padding: 46px 0; border-bottom: 1px solid var(--line); }
.case.flip .case-text { order: 2; }
.case .no { display: block; font-size: 15px; font-weight: 800; color: var(--grey); letter-spacing: .08em; margin-bottom: 18px; }
.case h3 { font-size: clamp(34px, 4.4vw, 60px); font-weight: 800; letter-spacing: -0.04em; line-height: .98; color: var(--navy); margin: 12px 0 16px; }
.case p { font-size: 18px; color: var(--ink); max-width: 26em; }
.case .skills-line { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--hot); }
.case .open { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; font-weight: 700; color: var(--navy); border-bottom: 2px solid var(--navy); padding-bottom: 4px; }
.case .open i { font-style: normal; transition: transform .25s ease; }
.case:hover .open i { transform: translateX(8px); }
.case:hover .open { color: var(--hot); border-color: var(--hot); }
.stage { background: var(--sky); aspect-ratio: 7 / 5; display: grid; place-items: center; padding: 6%; transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .5s; overflow: hidden; }
.case:hover .stage { transform: translateY(-8px); box-shadow: 0 30px 60px -30px rgba(27, 58, 92, .45); }
.demo { background: #fff; width: 100%; height: 100%; position: relative; font-size: 13px; color: var(--ink); box-shadow: 0 1px 0 var(--line); overflow: hidden; }

.d-report { display: grid; grid-template-rows: auto 1fr; padding: 16px; gap: 14px; }
.d-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.d-kpis div { background: var(--sky); padding: 10px 12px; }
.d-kpis small { display: block; color: var(--grey); font-size: 11.5px; font-weight: 600; }
.d-kpis b { font-size: clamp(16px, 2vw, 24px); font-weight: 800; color: var(--navy); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.d-body { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; min-height: 0; }
.d-body svg { width: 100%; height: 100%; }
.d-bars { display: grid; gap: 7px; align-content: center; }
.d-bar { display: grid; grid-template-columns: 82px 1fr; align-items: center; gap: 8px; transition: opacity .3s; font-size: 12px; }
.d-bar span { text-align: right; }
.d-bar i { height: 13px; background: var(--blue); }
.d-bar.dim { opacity: .25; }
.d-cursor { position: absolute; left: 0; top: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--hot); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); transform: translate(70%, 78%); transition: transform .65s cubic-bezier(.4, 0, .2, 1); margin: -8px 0 0 -8px; }
.d-cursor.click { box-shadow: 0 0 0 10px rgba(228, 87, 46, .25); }

.d-sql { display: grid; grid-template-rows: auto auto 1fr; padding: 16px; gap: 10px; }
.d-sql pre { margin: 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; background: #f8fafc; border: 1px solid var(--line); padding: 12px 14px; min-height: 9.6em; white-space: pre-wrap; }
.d-sql pre b { color: var(--blue); }
.caret { display: inline-block; width: 7px; height: 1.05em; background: var(--hot); vertical-align: text-bottom; margin-left: 1px; animation: blink .8s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.d-run { justify-self: start; background: var(--navy); color: #fff; font-weight: 700; font-size: 12px; padding: 6px 12px; transition: background .15s, transform .15s; }
.d-run.press { background: var(--hot); transform: scale(.94); }
.d-sql table { border-collapse: collapse; width: 100%; font-size: 12.5px; align-self: start; opacity: 0; }
.d-sql table.show { opacity: 1; }
.d-sql th { text-align: left; font-family: var(--mono); font-size: 11px; color: var(--grey); border-bottom: 2px solid var(--navy); padding: 3px 8px 4px 0; }
.d-sql td { padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line); animation: rise .3s both; }
.d-sql td:last-child, .d-sql th:last-child { text-align: right; font-variant-numeric: tabular-nums; }

.d-clean { padding: 16px; display: grid; grid-template-rows: auto 1fr; gap: 12px; }
.d-step { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: #f8fafc; padding: 8px 12px; font-size: 13px; }
.d-step span { font-family: Georgia, serif; font-style: italic; font-weight: 700; color: var(--grey); }
.d-step b { color: var(--navy); }
.d-step em { margin-left: auto; font-style: normal; font-weight: 700; color: var(--hot); font-variant-numeric: tabular-nums; }
.d-clean table { border-collapse: collapse; width: 100%; font-size: 12.5px; align-self: start; }
.d-clean th { text-align: left; background: var(--sky); color: var(--navy); padding: 6px 10px; border-bottom: 2px solid var(--navy); font-size: 12px; }
.d-clean td { padding: 6px 10px; border-bottom: 1px solid var(--line); border-right: 1px solid #eef1f5; white-space: nowrap; }
.d-clean td.flash { animation: flash 1.1s ease-out forwards; }
@keyframes flash { 0% { background: var(--hot); color: #fff; } 100% { background: #fde3d9; color: var(--ink); } }

.d-control { display: block; }
.d-flow { position: absolute; inset: 0; }
.d-flow i { position: absolute; left: 3%; top: 0; width: 11px; height: 14px; margin-top: -7px; background: #9aa6b2; }
.d-gate { position: absolute; left: 49%; top: 12%; bottom: 12%; width: 3px; background: var(--navy); }
.d-gate span { position: absolute; top: -4px; left: 50%; transform: translate(-50%, -100%); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); white-space: nowrap; }
.d-in { position: absolute; left: 4%; top: 50%; transform: translateY(-190%); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); }
.d-lane { position: absolute; right: 0; width: 34%; padding: 10px 14px; text-align: right; z-index: 1; background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 45%); }
.d-lane.ok { top: 8%; } .d-lane.ko { bottom: 8%; }
.d-lane span { display: block; font-size: 11.5px; font-weight: 600; color: var(--grey); }
.d-lane b { font-size: clamp(22px, 2.8vw, 34px); font-weight: 800; letter-spacing: -0.03em; color: var(--blue); font-variant-numeric: tabular-nums; }
.d-lane.ko b { color: var(--hot); }

/* Parcours et contact */
.contact .big { background: linear-gradient(currentColor, currentColor) 0 100% / 0 3px no-repeat; transition: background-size .5s cubic-bezier(.2, .8, .2, 1), color .2s; padding-bottom: 6px; }
.contact .big:hover { background-size: 100% 3px; }
section#projets { padding-top: 70px; }

/* Pages projet : entrée en scène */
.p-head > div > * { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.p-head > div > :nth-child(2) { animation-delay: .06s; }
.p-head > div > :nth-child(3) { animation-delay: .12s; }
.dash { animation: rise .8s cubic-bezier(.2, .8, .2, 1) .18s both; }
.dash .kpi, .dash .panel { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.dash .kpi:nth-child(1) { animation-delay: .22s; } .dash .kpi:nth-child(2) { animation-delay: .28s; }
.dash .kpi:nth-child(3) { animation-delay: .34s; } .dash .kpi:nth-child(4) { animation-delay: .40s; }
.dash .panel { animation-delay: .46s; }
.dash .panel:nth-child(2) { animation-delay: .52s; } .dash .panel:nth-child(3) { animation-delay: .58s; } .dash .panel:nth-child(4) { animation-delay: .64s; }
.bar-row .fill { animation: grow .6s cubic-bezier(.2, .8, .2, 1) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } }
.kpi, .panel { transition: box-shadow .25s; }
.kpi:hover, .panel:hover { box-shadow: 0 10px 30px -18px rgba(27, 58, 92, .5); }
.tabs a { transition: opacity .2s, border-color .2s; }
.btn { transition: background .2s, color .2s, transform .2s; }
.btn:active { transform: scale(.97); }

@media (max-width: 980px) {
  .about .wrap { grid-template-columns: 200px minmax(0, 1fr); gap: 36px; }
  .case { grid-template-columns: 1fr; gap: 26px; }
  .case.flip .case-text { order: 0; }
}
@media (max-width: 680px) {
  .hero { min-height: calc(100svh - 56px); align-items: flex-start; }
  .hero .wrap { padding-top: 56px; }
  .about { padding-top: 64px; }
  .about .wrap { grid-template-columns: 1fr; }
  .about figure { width: 55%; }
  .field-label { left: 18px; bottom: 14px; }
  .d-body { grid-template-columns: 1fr; }
  .d-body svg { display: none; }
  .stage { aspect-ratio: 5 / 4; padding: 4%; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .rise, .hero h1 .line > span { opacity: 1; transform: none; }
  .about figure.reveal img { clip-path: none; transform: none; }
  .statement span { opacity: 1; }
  .ticker-track { animation: none; }
}
html, body { overflow-x: clip; }

/* Nettoyage en pandas : invite de notebook et types de colonnes */
.formula > span#prompt { font-family: var(--mono); font-style: normal; font-size: 12.5px; font-weight: 400; color: var(--blue); white-space: nowrap; }
.formula pre { min-height: 4.4em; }
.formula pre b, .nb-code b { color: var(--blue); font-weight: 600; }
.formula pre .str, .nb-code .str { font-style: normal; color: #a4401f; }
.rows.pq th { font-family: var(--mono); font-size: 12px; }
.rows.pq th i { display: block; margin: 2px 0 0; font-size: 10.5px; }

/* Notebook Python */
.nb { background: #fff; }
.nb-bar { display: flex; align-items: center; gap: 18px; padding: 12px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 64px; background: #fff; z-index: 5; }
.nb-file { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--navy); }
.nb-kernel { font-size: 13px; color: var(--grey); margin-right: auto; display: flex; align-items: center; gap: 7px; }
.nb-kernel i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.nb-bar .btn { padding: 8px 14px; font-size: 13.5px; }
#cells { padding: 10px 22px 34px; }
.nb-md { padding: 30px 0 12px 96px; max-width: 900px; }
.nb-md h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--navy); }
.nb-md p { color: var(--grey); margin-top: 6px; font-size: 16px; }
.nb-md ul { margin-top: 12px; display: grid; gap: 10px; }
.nb-md li { position: relative; padding-left: 18px; font-size: 17px; max-width: 44em; }
.nb-md li::before { content: ""; position: absolute; left: 0; top: .6em; width: 8px; height: 3px; background: var(--hot); }
.nb-end { border-top: 3px solid var(--navy); margin-top: 40px; }
.nb-cell { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px 12px; align-items: start; }
.nb-in, .nb-outp { font-family: var(--mono); font-size: 12px; text-align: right; padding-top: 13px; white-space: nowrap; }
.nb-in { color: var(--blue); } .nb-outp { color: var(--hot); }
.nb-code { margin: 0; background: #f6f8fb; border: 1px solid var(--line); border-left: 3px solid var(--line); padding: 12px 16px; font-family: var(--mono); font-size: 13px; line-height: 1.6; overflow-x: auto; transition: border-color .3s; }
.nb-cell.running .nb-code { border-left-color: var(--hot); }
.nb-cell.done .nb-code { border-left-color: var(--blue); }
.nb-out { padding: 8px 0 4px; min-width: 0; animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.rows.df { width: auto; font-family: var(--mono); font-size: 12.5px; }
.rows.df th, .rows.df td { padding: 6px 16px 6px 0; white-space: nowrap; }
.rows.df tbody th { text-align: left; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--line); }
.nb-shape { font-family: var(--mono); font-size: 12px; color: var(--grey); margin-top: 8px; }
.cohorts { display: grid; gap: 3px; font-size: 12.5px; max-width: 860px; min-width: 560px; }
.cohorts .ch { text-align: center; color: var(--grey); font-size: 11.5px; padding-bottom: 4px; white-space: nowrap; }
.cohorts .cl { color: var(--ink); padding-right: 12px; white-space: nowrap; display: flex; align-items: center; }
.cohorts .cc { text-align: center; padding: 7px 0; font-variant-numeric: tabular-nums; font-weight: 600; animation: pop .45s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d); }
@keyframes pop { from { opacity: 0; transform: scale(.6); } }
.nb-chart { height: 320px; max-width: 760px; }
.nb-bars { max-width: 620px; padding-top: 6px; }
.nb-bars .bar-row .fill { height: 22px; }
.nb-out .legend { margin: 4px 0 10px; }
@media (max-width: 680px) {
  .nb-bar { top: 56px; padding: 10px 14px; flex-wrap: wrap; gap: 8px 14px; }
  #cells { padding: 6px 14px 26px; }
  .nb-md { padding-left: 0; }
  .nb-cell { grid-template-columns: 1fr; gap: 2px; }
  .nb-in, .nb-outp { text-align: left; padding-top: 6px; }
}

/* Test A/B */
.verdict { background: #fff; border-left: 5px solid var(--hot); padding: 14px 18px; margin-bottom: 12px; font-size: 17px; }
.verdict.yes { border-left-color: var(--good); }
.verdict b { color: var(--hot); } .verdict.yes b { color: var(--good); }
.kpi b.good { color: var(--good); }
.panel-note { font-size: 13.5px; color: var(--grey); margin-top: 10px; }
.controls .btn { padding: 9px 16px; font-size: 14px; min-width: 11.5em; text-align: center; }

/* Aperçus animés : notebook Python et test A/B */
.d-python { padding: 16px; display: grid; grid-template-rows: auto 1fr; gap: 12px; }
.d-cell { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; }
.d-cell span { font-family: var(--mono); font-size: 11.5px; color: var(--blue); padding-top: 11px; white-space: nowrap; }
.d-cell pre { margin: 0; background: #f6f8fb; border: 1px solid var(--line); border-left: 3px solid var(--blue); padding: 9px 12px; font-family: var(--mono); font-size: 11.5px; line-height: 1.55; min-height: 4.6em; white-space: pre-wrap; overflow: hidden; }
.d-cell pre b { color: var(--blue); } .d-cell pre .str { font-style: normal; color: #a4401f; }
.d-heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; align-content: start; }
.d-heat i { font-style: normal; text-align: center; font-size: 12px; font-weight: 600; padding: 6px 0; background: rgba(27, 79, 156, var(--a)); opacity: 0; transform: scale(.6); transition: opacity .3s, transform .3s; font-variant-numeric: tabular-nums; }
.d-heat i.on { opacity: 1; transform: none; }
.d-clean .d-step b { font-family: var(--mono); font-size: 12px; font-weight: 400; }
.d-clean th { font-family: var(--mono); font-weight: 600; }

.d-ab { padding: 16px; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; }
.d-abhead { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--grey); }
.d-abhead b { font-size: 22px; font-weight: 800; color: var(--navy); margin-left: 4px; font-variant-numeric: tabular-nums; }
.d-verdict { font-weight: 700; color: var(--hot); transition: color .3s; }
.d-verdict.yes { color: var(--good); }
.d-ab svg { width: 100%; height: 100%; min-height: 0; }
.d-ab path { transition: d .2s linear; stroke-width: 2; vector-effect: non-scaling-stroke; }
.d-ab path.a { fill: rgba(154, 166, 178, .28); stroke: #9aa6b2; }
.d-ab path.b { fill: rgba(27, 79, 156, .2); stroke: var(--blue); }
.d-ab line { stroke: var(--line); vector-effect: non-scaling-stroke; }
.d-ablegend { display: flex; gap: 18px; font-size: 13px; color: var(--grey); }
.d-ablegend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; background: #9aa6b2; }
.d-ablegend i.b { background: var(--blue); }
.d-ablegend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.d-ablegend span:last-child { margin-left: auto; }
.d-kpis b { white-space: nowrap; font-size: clamp(15px, 1.7vw, 22px); }

.top nav a.version { border: 1px solid rgba(255, 255, 255, .4); padding: 5px 10px; opacity: 1; font-size: 13px; }
.top nav a.version:hover { background: #fff; color: var(--navy); }

/* Page projet ouverte dans le tableau de bord : sans barre du haut, onglets ni pied de page */
.embed .top, .embed .tabs, .embed footer { display: none; }
.embed .p-head { padding-top: 26px; }
.embed .nb-bar { top: 0; }
.embed .code { margin-bottom: 32px; }
