:root {
  --ink: #1B1D26;
  --pcb: #1E2130;
  --pcb-dark: #16181F;
  --copper: #D8284F;
  --copper-dark: #B91F41;
  --paper: #F5F6F8;
  --line: #DADDE4;
  --mute: #565B6B;
  --bs-body-font-family: "Source Sans 3", system-ui, sans-serif;
  --bs-body-color: var(--ink);
}
    
body { background: var(--paper); font-size: 1.08rem; line-height: 1.6; }
h1, h2, h3 { font-family: "Bricolage Grotesque", "Source Sans 3", sans-serif; letter-spacing: -0.01em; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; }

/* Navigation */
.site-nav { background: var(--pcb-dark); border-bottom: 3px solid var(--copper); }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 42px; width: auto; display: block; }
.site-nav .nav-link { color: #fff; font-weight: 600; }
.site-nav .nav-link:hover { color: #FF8FA8; }
.btn-copper { background: var(--copper); border-color: var(--copper); color: #fff; font-weight: 600; }
.btn-copper:hover, .btn-copper:focus { background: var(--copper-dark); border-color: var(--copper-dark); color: #fff; }

/* En-tête de page */
.page-head {
  background-color: var(--paper);
  background-image: radial-gradient(circle, #C6CAD4 1.4px, transparent 1.6px);
  background-size: 22px 22px;
  padding: 2.5rem 0 2.75rem;
  border-bottom: 1px solid var(--line);
}
.crumbs { font-size: .95rem; color: var(--mute); margin-bottom: 1rem; }
.crumbs a { color: var(--mute); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--copper); }
.page-head h1 { font-weight: 800; font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.1; color: var(--pcb-dark); margin-bottom: .5rem; }
.page-head .sub { color: var(--mute); max-width: 55ch; margin-bottom: 1.25rem; }

.counts { display: flex; flex-wrap: wrap; gap: .6rem; }
.count { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .95rem; padding: .3rem .85rem; border-radius: 999px; }
.count-open { background: #DDF1E6; color: #11603B; }
.count-locked { background: #E7E9EE; color: #4A5160; }

/* Liste des exercices */
.list-wrap { padding: 2.5rem 0 3.5rem; }
.ex-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .85rem; }

.ex {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.15rem;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  color: inherit; text-decoration: none;
}
.ex .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.ex .body { flex: 1; min-width: 0; }
.ex .title { display: block; font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 1.15rem; line-height: 1.3; }
.ex .meta { display: block; font-size: .93rem; color: var(--mute); }
.state { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; font-weight: 600; padding: .25rem .7rem; border-radius: 999px; white-space: nowrap; }
.go { color: var(--copper); font-size: 1.15rem; flex: none; }

/* Exercice ouvert : cliquable */
.ex-open { border-color: #BFE3CE; }
.ex-open .ico { background: #DDF1E6; color: #11603B; }
.ex-open .state { background: #DDF1E6; color: #11603B; }
.ex-open:hover { border-color: var(--copper); box-shadow: 4px 4px 0 var(--copper); color: inherit; }

/* Exercice verrouillé : non cliquable */
.ex-locked { background: #F0F1F4; cursor: not-allowed; }
.ex-locked .ico { background: #E2E4EA; color: #6B7280; }
.ex-locked .title { color: #6B7280; }
.ex-locked .state { background: #E2E4EA; color: #4A5160; }

.note { margin-top: 1.75rem; display: flex; gap: .75rem; align-items: flex-start; color: var(--mute); font-size: 1rem; }
.note i { color: var(--copper); font-size: 1.2rem; }

@media (max-width: 575.98px) {
  .ex { flex-wrap: wrap; }
  .ex .state { order: 3; }
  .ex .go { margin-left: auto; }
}

footer { background: var(--pcb-dark); padding: 2rem 0; color: #AEB3C2; font-size: .95rem; }
footer a { color: #fff; font-weight: 600; }
footer img { height: 34px; width: auto; }
.visually-hidden-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
