/* ========================================================================== */
:root{
  --brand:#0e3a22; --brand-600:#124e31; --brand-500:#145132;
  --muted:#5b6472; --card:#fff; --border:#e9edf0; --grid:#d9e2dc;
  --radius:18px; --shadow:0 10px 28px rgba(15,23,42,.08);
  --shadow-lg:0 16px 44px rgba(15,23,42,.12); --trans:180ms cubic-bezier(.2,.7,.2,1);
}
html,body{margin:0}
.container{width:min(1200px,92vw);margin:auto;padding:24px}
.page-space{padding-top:24px}

/* Intro + loi */
.intro-plain{margin-bottom:28px}
.intro-plain h1{color:var(--brand);margin:0 0 12px;font-size:clamp(30px,3.2vw,44px);line-height:1.15}
.intro-plain p{color:#0f172a;margin:0 0 14px}
.inline-link{color:var(--brand);font-weight:800;text-decoration:none;border-bottom:3px solid color-mix(in oklab,var(--brand) 35%, #fff);padding-bottom:2px}
.law-plain{margin:30px 0 44px}
.law-plain h2{color:var(--brand);margin:0 0 8px}
.law-plain p{margin:0 0 12px;color:#0f172a}

.section-title{margin:8px 0 16px;font-size:clamp(24px,2.4vw,34px);line-height:1.2;font-weight:900;color:var(--brand);position:relative}
.section-title::after{content:"";display:block;width:230px;height:3px;margin-top:10px;background:linear-gradient(90deg,var(--brand),color-mix(in oklab,var(--brand) 50%,#fff));border-radius:999px}

/* Desktop / Mobile switch */
.bd-desktop{display:block}
.bd-mobile{display:none}

/* ---- TABLE DESKTOP ---- */
.bd-table-wrap{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow-x:auto;   /* on autorise le scroll horizontal si besoin */
  overflow-y:hidden;
}
.bd-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width:1050px; /* ← largeur plancher : aucune colonne ne “disparaît” */
  font:400 15px/1.65 ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
  color:#0f172a;
}

/* EN-TÊTE collant */
.bd-table thead th{
  position:sticky;top:0;z-index:3;
  background:#f1f5f2;
  padding:0 14px;height:96px;text-align:center;vertical-align:middle;font-weight:800
}

/* le corps commence SANS bordure haute sur la 1ère ligne → pas de double-ligne */
.bd-table tbody tr:first-child > *{ border-top:none }

/* grille */
.bd-table thead tr > *:not(:last-child),
.bd-table tbody tr > *:not(:last-child){ border-right:1px solid var(--grid) }
.bd-table tbody tr > *{ border-top:1px solid var(--grid) }
.bd-table th,.bd-table td{ padding:16px 14px; vertical-align:middle }

/* sticky première col */
.bd-sticky-col{position:sticky;left:0;z-index:2;background:#fff;min-width:240px;font-weight:800;color:var(--brand)}

/* titres + badge */
.bd-col-title{position:relative;display:flex;align-items:flex-end;justify-content:center;margin:0;min-height:56px;padding-bottom:16px;line-height:1.2;font-weight:900;color:var(--brand)}
.bd-col-title::after{content:"";position:absolute;left:50%;transform:translateX(-50%);bottom:0;width:72%;max-width:140px;height:2px;background:color-mix(in oklab,var(--brand) 65%, #fff);border-radius:999px}
.bd-badge{display:inline-block;padding:.24rem .64rem;border-radius:999px;font-size:.72rem;letter-spacing:.05em;text-transform:uppercase;border:1px solid #cfe7da;color:var(--brand-500);background:color-mix(in oklab,#cfe7da 22%, #fff);margin-top:12px}
.bd-badge.is-mech{border-color:#d6d9e4;color:#475569;background:color-mix(in oklab,#d6d9e4 24%, #fff)}
.bd-badge.is-chem{border-color:#f5d0d0;color:#b42318;background:color-mix(in oklab,#f5d0d0 26%, #fff)}

.bd-table tbody tr:nth-child(odd) td{background:#fafafa}
.bd-table tbody tr:hover td{background:#eef6f1}

/* étoiles */
.bd-stars{display:inline-flex;gap:2px;justify-content:center;align-items:center}
.bd-star{width:18px;height:18px;fill:var(--brand-500)}
.bd-star.bd-empty{fill:transparent;stroke:var(--brand-500);stroke-width:1.2px}
td:has(.bd-stars){text-align:center}

/* Survol par colonne (explicite) */
@media (hover:hover){
  .bd-table:has(thead th:nth-child(1):hover) thead th:nth-child(1),
  .bd-table:has(tbody td:nth-child(1):hover) thead th:nth-child(1),
  .bd-table:has(thead th:nth-child(1):hover) tbody td:nth-child(1),
  .bd-table:has(tbody td:nth-child(1):hover) tbody td:nth-child(1){ background:#e3efe7 !important }

  .bd-table:has(thead th:nth-child(2):hover) thead th:nth-child(2),
  .bd-table:has(tbody td:nth-child(2):hover) thead th:nth-child(2),
  .bd-table:has(thead th:nth-child(2):hover) tbody td:nth-child(2),
  .bd-table:has(tbody td:nth-child(2):hover) tbody td:nth-child(2){ background:#e7f3ed !important }
  .bd-table:has(thead th:nth-child(3):hover) thead th:nth-child(3),
  .bd-table:has(tbody td:nth-child(3):hover) thead th:nth-child(3),
  .bd-table:has(thead th:nth-child(3):hover) tbody td:nth-child(3),
  .bd-table:has(tbody td:nth-child(3):hover) tbody td:nth-child(3){ background:#e7f3ed !important }
  .bd-table:has(thead th:nth-child(4):hover) thead th:nth-child(4),
  .bd-table:has(tbody td:nth-child(4):hover) thead th:nth-child(4),
  .bd-table:has(thead th:nth-child(4):hover) tbody td:nth-child(4),
  .bd-table:has(tbody td:nth-child(4):hover) tbody td:nth-child(4){ background:#e7f3ed !important }
  .bd-table:has(thead th:nth-child(5):hover) thead th:nth-child(5),
  .bd-table:has(tbody td:nth-child(5):hover) thead th:nth-child(5),
  .bd-table:has(thead th:nth-child(5):hover) tbody td:nth-child(5),
  .bd-table:has(tbody td:nth-child(5):hover) tbody td:nth-child(5){ background:#e7f3ed !important }
  .bd-table:has(thead th:nth-child(6):hover) thead th:nth-child(6),
  .bd-table:has(tbody td:nth-child(6):hover) thead th:nth-child(6),
  .bd-table:has(thead th:nth-child(6):hover) tbody td:nth-child(6),
  .bd-table:has(tbody td:nth-child(6):hover) tbody td:nth-child(6){ background:#e7f3ed !important }
  .bd-table:has(thead th:nth-child(7):hover) thead th:nth-child(7),
  .bd-table:has(tbody td:nth-child(7):hover) thead th:nth-child(7),
  .bd-table:has(thead th:nth-child(7):hover) tbody td:nth-child(7),
  .bd-table:has(tbody td:nth-child(7):hover) tbody td:nth-child(7){ background:#e7f3ed !important }
  .bd-table:has(thead th:nth-child(8):hover) thead th:nth-child(8),
  .bd-table:has(tbody td:nth-child(8):hover) thead th:nth-child(8),
  .bd-table:has(thead th:nth-child(8):hover) tbody td:nth-child(8),
  .bd-table:has(tbody td:nth-child(8):hover) tbody td:nth-child(8){ background:#e7f3ed !important }
}

/* ---- CARTES (MOBILE) ---- */
@media (max-width:1050px){
  .bd-desktop{display:none}
  .bd-mobile{display:block}

  .bd-cards{display:grid;gap:14px}
  .bd-card{background:#fff;border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);padding:12px 14px}
  .bd-card-hd{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
  .bd-card-hd h3{margin:0;font-size:1rem;color:var(--brand)}
  .bd-card-list{margin:0;padding:0}
  .bd-card-row{display:grid;grid-template-columns:140px 1fr;gap:10px;padding:10px 0;border-top:1px dashed var(--grid)}
  .bd-card-row:first-child{border-top:none}
  .bd-card-row dt{font-weight:700;color:#0f172a}
  .bd-card-row dd{margin:0}
}

/* ================== FIX raccord colonne collante ================== */
.bd-table thead th.bd-sticky-col,
.bd-table tbody th.bd-sticky-col{
  border-right:none !important;
  position:sticky;
  left:0;
}
.bd-table thead th.bd-sticky-col::after,
.bd-table tbody th.bd-sticky-col::after{
  content:"";
  position:absolute;
  top:0; bottom:0; right:0;
  width:1px; background:var(--grid);
  z-index:4;
}
.bd-table tbody tr:first-child th.bd-sticky-col::before{
  content:"";
  position:absolute; left:0; right:0; top:0;
  height:1px; background:var(--grid);
  z-index:3;
}
.bd-sticky-col{ background-clip:padding-box; }

/* ====== ALIGNER "CRITÈRES" À GAUCHE (desktop) ====== */
.bd-table thead th.bd-sticky-col{
  text-align:left !important;
  padding-left:16px;
}