/* Index des scientifiques noirs — BlackGenius Canada
   Palette : noir de marque, or du logo, blanc. Typo : Archivo Black, Playfair Display, Inter. */
:root {
  --ink: #0A0A0A;
  --gold: #BE9647;
  --gold-text: #856421;
  --gold-light: #F4E9CE;
  --white: #FFFFFF;
  --mist: #F1F1F1;
  --line: #E2E2E2;
  --text: #1A1A1A;
  --muted: #5F5F5F;
  --dim: #2A2A2A;
  --display: 'Archivo Black', Arial, sans-serif;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--text); background: var(--white); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white); padding: 10px 16px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }

/* En-tête */
.bar { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.bar img { width: 158px; }
.bar nav ul { display: flex; align-items: center; gap: 24px; font-size: .92rem; font-weight: 500; }
.bar nav a { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.bar nav a:hover { border-bottom-color: var(--gold); }
.bar .back { background: var(--ink); color: var(--white); padding: 9px 16px; border-radius: 4px; border: 0; }
.bar .back:hover { background: var(--gold); color: var(--ink); }

/* Héros */
.hero { background: var(--ink); color: var(--white); padding: 72px 0 80px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 4.4vw, 3.5rem); line-height: 1.14; letter-spacing: -.01em; }
.hero h1 .n { color: var(--gold); font-family: var(--display); font-weight: 400; padding-inline: .06em; }
.hero-sub { margin-top: 22px; color: #D6D6D6; max-width: 56ch; }
.hero-sub a { color: var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.chip { background: transparent; color: var(--white); border: 1px solid #5A5A5A; border-radius: 999px; padding: 8px 16px; font-size: .92rem; }
.chip:hover { border-color: var(--gold); }
.chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 600; }
.waffle { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; max-width: 420px; margin-inline: auto; }
.waffle i { aspect-ratio: 1; background: var(--dim); border-radius: 2px; transition: background-color .35s ease; }
.waffle i.on { background: var(--gold); }
.legend { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; margin-top: 18px; font-size: .86rem; color: #D6D6D6; }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 8px; vertical-align: -1px; background: var(--dim); }
.legend span.g::before { background: var(--gold); }

/* Sections */
section { padding: 88px 0; }
section.alt { background: var(--mist); }
.head { max-width: 760px; margin-bottom: 44px; }
.head h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.2; }
.head p { margin-top: 16px; color: var(--muted); font-size: 1.05rem; }

/* Statuts : forme + texte, jamais la couleur seule */
.st { display: inline-block; font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.st-verifie { background: var(--gold); color: var(--ink); }
.st-a_verifier { border: 1.5px solid var(--gold-text); color: var(--gold-text); }
.st-indisponible { border: 1.5px dashed var(--muted); color: var(--muted); }
.st-partiel { background: var(--gold-light); color: var(--ink); border: 1.5px solid var(--gold); }

/* Parcours */
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--white); }
.step { text-align: left; background: var(--white); border: 0; border-right: 1px solid var(--line); padding: 18px 16px; color: var(--text); }
.step:last-child { border-right: 0; }
.step b { display: block; font-family: var(--display); font-weight: 400; font-size: .98rem; line-height: 1.25; margin-bottom: 10px; }
.step[aria-selected="true"] { background: var(--ink); color: var(--white); }
.step .st { font-size: .72rem; }
.step[aria-selected="true"] .st-a_verifier, .step[aria-selected="true"] .st-indisponible { color: #E9D9B2; border-color: #E9D9B2; }
.panel { margin-top: 26px; background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 32px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; }
.panel h3 { font-family: var(--serif); font-size: 1.55rem; line-height: 1.25; margin-bottom: 14px; }
.panel p { color: var(--muted); }
.panel h4 { font-size: .95rem; margin-bottom: 12px; }
.src-list li { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.src-list li:first-child { border-top: 0; padding-top: 0; }
.src-list a { text-decoration-color: var(--gold); text-underline-offset: 3px; }
.panel .go { display: inline-block; margin-top: 18px; font-weight: 600; text-decoration-color: var(--gold); text-underline-offset: 4px; }

/* Explorateur */
.explore { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: start; }
.tools { display: flex; gap: 8px; margin-bottom: 18px; }
.tool { border: 1px solid var(--muted); background: var(--white); border-radius: 4px; padding: 7px 14px; font-size: .9rem; }
.tool[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.bars { position: relative; }
.bar-row { display: grid; grid-template-columns: 190px 1fr 74px; gap: 14px; align-items: center; width: 100%; background: transparent; border: 0; text-align: left; padding: 7px 8px; border-radius: 4px; }
.bar-row:hover { background: rgba(190,150,71,.14); }
.bar-row[aria-current="true"] { background: var(--gold-light); }
.bar-row .lab { font-size: .9rem; line-height: 1.3; }
.bar-row .track { position: relative; height: 18px; background: #E4E4E4; border-radius: 2px; }
.bar-row .fill { position: absolute; inset: 0 auto 0 0; background: var(--ink); border-radius: 2px; transition: width .5s ease; }
.bar-row[aria-current="true"] .fill { background: var(--gold-text); }
.bar-row .val { font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; font-size: .92rem; }
.ref { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--gold-text); pointer-events: none; }
.ref-note { margin-top: 14px; font-size: .86rem; color: var(--muted); padding-left: 8px; }
.ref-note::before { content: ""; display: inline-block; width: 18px; border-top: 2px dashed var(--gold-text); margin-right: 8px; vertical-align: 4px; }
.insight { margin-top: 22px; padding: 18px 20px; background: var(--white); border-left: 3px solid var(--gold); font-size: .98rem; }
.fiche { background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 26px; position: sticky; top: 90px; }
.fiche h3 { font-family: var(--serif); font-size: 1.2rem; line-height: 1.3; margin-bottom: 12px; }
.fiche dl { display: grid; grid-template-columns: 112px 1fr; gap: 9px 14px; font-size: .9rem; margin-top: 16px; }
.fiche dt { color: var(--muted); }
.fiche dd { font-variant-numeric: tabular-nums; }
.fiche dd a { text-underline-offset: 3px; text-decoration-color: var(--gold); }
.comp { margin-top: 26px; }
.comp h4 { font-size: .9rem; margin-bottom: 10px; }
.comp-bar { display: flex; height: 22px; border-radius: 3px; overflow: hidden; gap: 2px; background: var(--white); }
.comp-bar i { display: block; height: 100%; min-width: 2px; }
.comp-leg { margin-top: 12px; display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; font-size: .84rem; }
.comp-leg .k { display: flex; align-items: center; gap: 8px; }
.comp-leg .k::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--sw); flex: none; }
.comp-leg .v { text-align: right; font-variant-numeric: tabular-nums; }

/* Canada */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { border: 1px solid var(--line); border-radius: 6px; padding: 24px; display: flex; flex-direction: column; background: var(--white); }
.card .big { font-family: var(--display); font-size: clamp(1.7rem, 2.6vw, 2.2rem); line-height: 1.1; }
.card p { margin-top: 12px; font-size: .95rem; }
.card .meta { margin-top: auto; padding-top: 16px; font-size: .8rem; color: var(--muted); }
.card .meta a { text-underline-offset: 3px; text-decoration-color: var(--gold); }
.card .lim { font-size: .82rem; color: var(--muted); margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.note-band { margin-top: 26px; padding: 18px 22px; background: var(--gold-light); border-radius: 6px; font-size: .95rem; }

/* Lacunes */
.gaps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.gap { background: var(--white); border: 1.5px dashed #9A9A9A; border-radius: 6px; padding: 24px; }
.gap h3 { font-family: var(--display); font-weight: 400; font-size: 1.1rem; margin-bottom: 10px; }
.gap p { color: var(--muted); font-size: .95rem; }

/* Méthode */
.method { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.method h3 { font-family: var(--display); font-weight: 400; font-size: 1.15rem; margin-bottom: 16px; }
.legend-st li { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); font-size: .92rem; align-items: start; }
.legend-st li:first-child { border-top: 0; }
details { border-top: 1px solid var(--line); padding: 14px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::after { content: "+"; color: var(--gold-text); font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "\2212"; }
details p { margin-top: 10px; color: var(--muted); font-size: .95rem; }
.dl { display: inline-block; margin-top: 22px; background: var(--ink); color: var(--white); padding: 11px 20px; border-radius: 4px; border: 0; font-weight: 600; }
.dl:hover { background: var(--gold); color: var(--ink); }
.all-src { margin-top: 56px; }
.all-src h3 { font-family: var(--display); font-weight: 400; font-size: 1.15rem; margin-bottom: 8px; }

/* Pied de page */
footer { background: var(--ink); color: #D6D6D6; padding: 56px 0 40px; font-size: .92rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 32px 56px; justify-content: space-between; }
footer h2 { font-family: var(--display); font-weight: 400; color: var(--white); font-size: 1.05rem; margin-bottom: 10px; }
footer a { color: var(--gold); text-underline-offset: 3px; }
footer .fine { width: 100%; border-top: 1px solid #333; padding-top: 22px; font-size: .82rem; color: #A8A8A8; }

@media (max-width: 960px) {
  .hero .wrap, .explore, .method, .panel { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step { border-bottom: 1px solid var(--line); }
  .fiche { position: static; }
}
@media (max-width: 600px) {
  section { padding: 60px 0; }
  .cards, .gaps { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr 64px; }
  .bar-row .track { grid-column: 1 / -1; grid-row: 2; }
  .bar-row .lab { grid-column: 1; }
  .bar-row .val { grid-column: 2; grid-row: 1; }
  .legend-st li { grid-template-columns: 1fr; gap: 6px; }
  .hero { padding: 48px 0 56px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .waffle i, .bar-row .fill { transition: none; }
}

/* Barres statiques, sous-titres, cartes emploi */
.bar-row.static{cursor:default}
.bar-row.static:hover{background:transparent}
.sub-l{display:block;font-size:.76rem;color:var(--muted);margin-top:2px}
.sub{font-family:var(--display);font-weight:400;font-size:1.15rem;margin:44px 0 18px}
.cards.cards-2{grid-template-columns:repeat(2,1fr)}
#ca-bars,#em-bars{max-width:860px}
#ca-insight,#ca-note,#em-note,#em-lim{max-width:860px}
@media(max-width:600px){.cards.cards-2{grid-template-columns:1fr}}
.tools{flex-wrap:wrap}

/* Menu mobile : une seconde ligne défilante, bouton « Retour » en premier */
@media (max-width: 960px) {
  .bar .wrap { flex-wrap: wrap; row-gap: 0; }
  .bar nav { order: 3; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .bar nav::-webkit-scrollbar { display: none; }
  .bar nav ul { gap: 20px; white-space: nowrap; padding: 2px 0 10px; }
  .bar nav ul li:last-child { order: -1; }
  .bar { position: sticky; }
  section[id] { scroll-margin-top: 112px; }
  .bar .wrap { min-height: 0; padding-top: 8px; }
}
@media (min-width: 961px) { section[id] { scroll-margin-top: 80px; } }
.chip, .tool { min-height: 40px; }
.step { min-height: 44px; }
.footer-links a, footer a { padding-block: 2px; }
