/* ============================================================================
   Base de connaissance publique (/ressources/base-de-connaissance) — bdc.css
   Tokens : public-refonte.css (V9). Tout est scopé .bdc.
   Les classes graphiques (.chart, .bar-*, .cols, .gauge-*, .frise, .donut-*,
   .duel, .stat) rendent le HTML PRÉ-RENDU par Magellan
   (ontologie/_pipeline/fiches_v2_lib.py) — garder les noms synchronisés.
   ============================================================================ */

.bdc { font-family: var(--plr-font); color: var(--plr-text-2); }

/* ------------------------------------------------------------ structure --- */
.bdc .bdc-crumb { font-size: 13px; color: var(--plr-text-3); margin-bottom: 18px; }
.bdc .bdc-crumb a { color: var(--plr-text-3); text-decoration: none; }
.bdc .bdc-crumb a:hover { color: var(--plr-navy); }
.bdc .bdc-section { margin: 44px 0; }
.bdc .bdc-section > h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; color: var(--plr-text); margin-bottom: 16px; }
.bdc .bdc-lead { font-size: clamp(16px, 1.6vw, 19px); line-height: 1.65; max-width: 70ch; }
.bdc p { line-height: 1.7; }
.bdc strong { color: var(--plr-navy); font-weight: 600; }
.bdc .note { font-size: 13px; color: var(--plr-text-3); margin-top: 14px; }
.bdc .src { font-size: 12px; color: var(--plr-text-3); margin-top: 8px; }

/* ------------------------------------------------------------- cartes ----- */
.bdc .bdc-cards { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.bdc .card { background: var(--plr-grey-neutral); border-radius: var(--plr-r-card); padding: 26px 28px; }
.bdc .card h3 { font-size: 17px; font-weight: 600; color: var(--plr-text); margin: 0 0 8px; }
.bdc .card p { font-size: 15px; margin: 0; }
.bdc .card-outline { background: var(--plr-white); border: 1px solid var(--plr-border); }
.bdc .vigil { border-left: 4px solid var(--plr-navy); }

.bdc .bdc-stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.bdc .stat { background: var(--plr-accent); border-radius: var(--plr-r-card); padding: 26px 20px; text-align: center; }
.bdc .stat b { display: block; font-size: clamp(24px, 2.8vw, 36px); font-weight: 700; letter-spacing: -.01em; color: var(--plr-navy); line-height: 1.1; }
.bdc .stat span { display: block; margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--plr-text-2); }

/* ------------------------------------------------------------ tableau ----- */
.bdc .bdc-tablewrap { overflow-x: auto; border: 1px solid var(--plr-border); border-radius: var(--plr-r-card); }
.bdc table.bdc-table { width: 100%; border-collapse: collapse; background: var(--plr-white); }
.bdc table.bdc-table th { background: var(--plr-navy); color: var(--plr-white); font-weight: 600; letter-spacing: .04em; text-align: left; padding: 13px 16px; font-size: 13px; }
.bdc table.bdc-table td { padding: 13px 16px; font-size: 14px; border-bottom: 1px solid var(--plr-border); color: var(--plr-text-2); vertical-align: top; }
.bdc table.bdc-table tr:last-child td { border-bottom: none; }
.bdc table.bdc-table td.k { font-weight: 600; color: var(--plr-text); }
.bdc table.bdc-table td.s { color: var(--plr-text-3); font-size: 12px; }

/* --------------------------------------------------------- graphiques ----- */
.bdc .chart { background: var(--plr-accent); border-radius: var(--plr-r-card); padding: 30px 32px; margin-top: 18px; }
.bdc .bar-row { margin-bottom: 18px; }
.bdc .bar-row:last-child { margin-bottom: 0; }
.bdc .bar-lbl { font-size: 14px; color: var(--plr-text-2); margin-bottom: 6px; }
.bdc .bar-track { display: flex; align-items: center; gap: 12px; }
.bdc .bar-fill { height: 32px; border-radius: var(--plr-r-btn); background: var(--plr-bar-grey); width: 0; transition: width .8s cubic-bezier(.2,.7,.2,1); min-width: 8px; }
.bdc .bar-fill.navy { background: var(--plr-navy); }
.bdc .bar-fill.blue { background: var(--plr-blue); }
.bdc .bar-val { font-weight: 700; font-size: 15px; color: var(--plr-text); white-space: nowrap; }

.bdc .cols { display: flex; align-items: flex-end; gap: clamp(10px, 2vw, 26px); height: 260px; margin-top: 8px; }
.bdc .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bdc .col-val { font-weight: 700; font-size: 14px; color: var(--plr-text); margin-bottom: 6px; }
.bdc .col-fill { width: 100%; max-width: 110px; border-radius: 20px 20px 0 0; background: var(--plr-bar-grey); height: 0; transition: height .8s cubic-bezier(.2,.7,.2,1); }
.bdc .col-fill.navy { background: var(--plr-navy); }
.bdc .col-fill.blue { background: var(--plr-blue); }
.bdc .col-lbl { font-size: 12px; color: var(--plr-text-2); margin-top: 8px; text-align: center; min-height: 32px; line-height: 1.3; }

.bdc .gauge-wrap { margin-top: 10px; }
.bdc .gauge-track { height: 36px; border-radius: var(--plr-r-btn); background: var(--plr-white); border: 1px solid var(--plr-blue); overflow: hidden; }
.bdc .gauge-fill { height: 100%; border-radius: var(--plr-r-btn); background: var(--plr-navy); width: 0; transition: width .8s cubic-bezier(.2,.7,.2,1); }
.bdc .gauge-lbls { display: flex; justify-content: space-between; margin-top: 10px; font-size: 13px; color: var(--plr-text-2); }
.bdc .gauge-lbls b { color: var(--plr-text); font-size: 16px; }

.bdc .frise { margin-top: 22px; position: relative; padding-left: 34px; }
.bdc .frise::before { content: ""; position: absolute; left: 10px; top: 8px; bottom: 8px; width: 2px; background: var(--plr-blue); }
.bdc .frise .et { position: relative; padding: 0 0 22px 8px; }
.bdc .frise .et:last-child { padding-bottom: 0; }
.bdc .frise .et::before { content: ""; position: absolute; left: -31px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--plr-navy); }
.bdc .frise .quand { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--plr-text-3); margin-bottom: 3px; }
.bdc .frise .et h3 { font-size: 16px; font-weight: 600; color: var(--plr-text); margin: 0 0 3px; }
.bdc .frise .et p { font-size: 14px; margin: 0; }

.bdc .donut-wrap { display: flex; align-items: center; gap: clamp(20px, 4vw, 54px); flex-wrap: wrap; margin-top: 10px; }
.bdc .donut-legend { flex: 1; min-width: 220px; }
.bdc .dl { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 14px; color: var(--plr-text-2); }
.bdc .dl i { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.bdc .dl b { color: var(--plr-text); margin-left: auto; white-space: nowrap; }

.bdc .duel { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.bdc .duel .card ul { list-style: none; margin: 12px 0 0; padding: 0; }
.bdc .duel .card li { position: relative; padding-left: 26px; margin-bottom: 10px; font-size: 14px; line-height: 1.5; color: var(--plr-text-2); }
.bdc .duel .card li::before { content: ""; position: absolute; left: 0; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--plr-navy); }
.bdc .duel .card li::after { content: ""; position: absolute; left: 4px; top: 8px; width: 6px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); }
.bdc .verdict { margin-top: 16px; background: var(--plr-navy); color: var(--plr-white); border-radius: var(--plr-r-card); padding: 18px 26px; font-size: 15px; font-weight: 500; }

/* --------------------------------------------------------- interactifs ---- */
.bdc .check { display: flex; align-items: flex-start; gap: 14px; background: var(--plr-white); border: 1px solid var(--plr-border); border-radius: var(--plr-r-card); padding: 15px 20px; margin-bottom: 12px; cursor: pointer; transition: border-color .15s; font-size: 15px; line-height: 1.5; color: var(--plr-text-2); }
.bdc .check:hover { border-color: var(--plr-navy); }
.bdc .check .box { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--plr-blue); margin-top: 1px; position: relative; transition: all .15s; }
.bdc .check.on { border-color: var(--plr-navy); color: var(--plr-text); }
.bdc .check.on .box { background: var(--plr-navy); border-color: var(--plr-navy); }
.bdc .check.on .box::after { content: ""; position: absolute; left: 5px; top: 4px; width: 8px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); }
.bdc .check-verdict { margin-top: 16px; background: var(--plr-beige); border-radius: var(--plr-r-card); padding: 17px 24px; font-size: 15px; color: var(--plr-text); }
.bdc .check-verdict.hot { background: var(--plr-navy); color: var(--plr-white); }

.bdc .quiz-q { background: var(--plr-white); border: 1px solid var(--plr-border); border-radius: var(--plr-r-card); padding: 22px 26px; margin-top: 16px; }
.bdc .quiz-q h3 { font-size: 16px; font-weight: 600; color: var(--plr-text); margin: 0 0 12px; }
.bdc .quiz-opt { display: block; width: 100%; text-align: left; font-family: inherit; font-size: 14px; color: var(--plr-text-2); background: var(--plr-white); border: 1px solid var(--plr-blue); border-radius: var(--plr-r-btn); padding: 11px 20px; margin-bottom: 10px; cursor: pointer; transition: all .15s; }
.bdc .quiz-opt:hover:not(:disabled) { border-color: var(--plr-navy); color: var(--plr-text); }
.bdc .quiz-opt.good { background: var(--plr-navy); border-color: var(--plr-navy); color: var(--plr-white); font-weight: 600; }
.bdc .quiz-opt.bad { border-color: var(--plr-bar-grey); color: var(--plr-text-3); text-decoration: line-through; }
.bdc .quiz-opt:disabled { cursor: default; }
.bdc .quiz-expl { display: none; margin-top: 12px; background: var(--plr-accent); border-radius: 20px; padding: 13px 18px; font-size: 14px; color: var(--plr-text-2); }
.bdc .quiz-expl.show { display: block; }

/* ------------------------------------------------- hub, recherche, arbo --- */
.bdc .bdc-search { position: relative; max-width: 640px; margin: 26px 0 10px; }
.bdc .bdc-search input { width: 100%; padding: 15px 24px; border: 1px solid var(--plr-border); border-radius: var(--plr-r-btn); font-size: 16px; font-family: inherit; color: var(--plr-text); background: var(--plr-white); outline: none; transition: border-color .15s; }
.bdc .bdc-search input:focus { border-color: var(--plr-navy); }
.bdc .bdc-results { position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; right: 0; background: var(--plr-white); border: 1px solid var(--plr-border); border-radius: var(--plr-r-card); overflow: hidden; display: none; max-height: 420px; overflow-y: auto; }
.bdc .bdc-results.show { display: block; }
.bdc .bdc-results a { display: block; padding: 13px 22px; text-decoration: none; border-bottom: 1px solid var(--plr-border); }
.bdc .bdc-results a:last-child { border-bottom: none; }
.bdc .bdc-results a:hover, .bdc .bdc-results a.sel { background: var(--plr-beige); }
.bdc .bdc-results .rt { font-weight: 600; color: var(--plr-text); font-size: 14px; }
.bdc .bdc-results .rb { font-size: 12px; color: var(--plr-text-3); margin-top: 2px; }
.bdc .bdc-noresult { padding: 14px 22px; font-size: 14px; color: var(--plr-text-3); }

.bdc .bdc-tree { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-top: 26px; }
.bdc .bdc-branch { background: var(--plr-grey-neutral); border-radius: var(--plr-r-card); padding: 24px 26px; text-decoration: none; transition: transform .15s; display: block; }
.bdc .bdc-branch:hover { transform: translateY(-2px); }
.bdc .bdc-branch b { display: block; font-size: 17px; font-weight: 600; color: var(--plr-text); }
.bdc .bdc-branch span { display: block; margin-top: 6px; font-size: 13px; color: var(--plr-text-3); }

.bdc .bdc-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.bdc .bdc-list a { display: block; background: var(--plr-white); border: 1px solid var(--plr-border); border-radius: var(--plr-r-card); padding: 18px 24px; text-decoration: none; transition: border-color .15s; }
.bdc .bdc-list a:hover { border-color: var(--plr-navy); }
.bdc .bdc-list b { display: block; font-size: 16px; font-weight: 600; color: var(--plr-text); }
.bdc .bdc-list span { display: block; margin-top: 4px; font-size: 13.5px; color: var(--plr-text-2); line-height: 1.5; }

.bdc .bdc-related { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.bdc .bdc-related a { background: var(--plr-beige); border-radius: var(--plr-r-card); padding: 18px 22px; text-decoration: none; display: block; }
.bdc .bdc-related a:hover { background: var(--plr-grey-neutral); }
.bdc .bdc-related i { display: block; font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--plr-text-3); margin-bottom: 6px; }
.bdc .bdc-related b { font-size: 14.5px; font-weight: 600; color: var(--plr-text); line-height: 1.4; }

/* ------------------------------------------------------- mentions/refs ---- */
.bdc .bdc-disclaimer { background: var(--plr-beige); border-radius: var(--plr-r-card); padding: 22px 28px; font-size: 12.5px; line-height: 1.65; color: var(--plr-text-3); margin: 44px 0 0; }
.bdc .bdc-disclaimer b { color: var(--plr-text-2); }
.bdc .bdc-refs { border-top: 1px solid var(--plr-border); padding-top: 22px; }
.bdc .bdc-refs h2 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--plr-text-3); font-weight: 600; margin-bottom: 12px; }
.bdc .bdc-refs li { font-size: 13px; color: var(--plr-text-3); margin: 0 0 7px 18px; line-height: 1.5; }
.bdc .bdc-refs a, .bdc table.bdc-table td.s a { color: var(--plr-navy); text-decoration: underline; text-underline-offset: 2px; }
.bdc .bdc-refs a:hover, .bdc table.bdc-table td.s a:hover { text-decoration: none; }

@media (max-width: 760px) {
  .bdc .bdc-cards, .bdc .duel { grid-template-columns: 1fr; }
}

/* ------------------------------------------------ « pour aller plus loin » --- */
.bdc .bdc-loin { background: var(--plr-beige); border-radius: var(--plr-r-card); padding: 26px 30px; margin-bottom: 16px; }
.bdc .bdc-loin-eyebrow { display: block; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--plr-text-3); margin-bottom: 8px; }
.bdc .bdc-loin h3 { font-size: 17px; font-weight: 600; color: var(--plr-text); margin: 0 0 10px; }
.bdc .bdc-loin p { font-size: 14.5px; line-height: 1.65; margin: 0 0 10px; }
.bdc .bdc-loin-apport { border-left: 3px solid var(--plr-navy); padding-left: 14px; }
.bdc .bdc-loin-cas { display: inline-block; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--plr-navy); text-decoration: none; }
.bdc .bdc-loin-cas:hover { text-decoration: underline; }

/* rangée vedette « cas clients » du hub */
.bdc .bdc-cas-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-top: 24px; }
.bdc .bdc-cas-card { background: var(--plr-navy); border-radius: var(--plr-r-card); padding: 24px 26px; text-decoration: none; display: block; transition: transform .15s; }
.bdc .bdc-cas-card:hover { transform: translateY(-2px); }
.bdc .bdc-cas-card i { display: block; font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--plr-blue); margin-bottom: 8px; }
.bdc .bdc-cas-card b { color: var(--plr-white); font-size: 15.5px; font-weight: 600; line-height: 1.45; }
