:root {
  --bg: #f6f3ed;
  --paper: #fffdf7;
  --ink: #161a1d;
  --muted: #5d6670;
  --line: #d8d0c3;
  --canada: #c1121f;
  --canada-dark: #780000;
  --steel: #214761;
  --steel-soft: #d9e6ec;
  --gold: #b56d1b;
  --shadow: 0 24px 70px rgba(22, 26, 29, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 8%, rgba(193, 18, 31, 0.09), transparent 28rem),
    linear-gradient(180deg, #fbf8f1 0%, var(--bg) 42%, #ece7dc 100%);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(22, 26, 29, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 26, 29, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 80%);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button,
.button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(193, 18, 31, 0.45);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid rgba(22, 26, 29, 0.12);
  background: rgba(246, 243, 237, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border-radius: 0.35rem;
  background: var(--canada);
  color: white;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.eyebrow,
.metric-label,
.disclaimer,
.site-footer {
  font-family: "Trebuchet MS", Verdana, sans-serif;
}

.brand small {
  color: var(--muted);
  font-size: 0.8rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

nav a {
  padding: 0.65rem 0.85rem;
  border-radius: 999px;
  color: var(--steel);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

nav a:hover,
nav a:focus-visible {
  background: var(--steel-soft);
  color: #16384f;
}

.language-switcher {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.72);
}

.lang-button {
  min-width: 2.5rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.84rem;
  font-weight: 800;
}

.lang-button.active {
  background: var(--canada);
  color: white;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: clamp(2rem, 6vw, 5rem);
  min-height: 86vh;
  align-items: center;
  padding: clamp(3rem, 8vw, 7rem) clamp(1rem, 6vw, 5rem);
}

.hero > *,
.section > * {
  min-width: 0;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--canada-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 1.25rem;
  font-size: clamp(3.6rem, 8vw, 7.2rem);
  line-height: 0.88;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.98;
}

h3 {
  margin-bottom: 0.8rem;
  font-size: clamp(1.6rem, 2.4vw, 2.4rem);
  line-height: 1;
}

h4 {
  margin-bottom: 0.55rem;
  color: var(--steel);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-lead {
  max-width: 600px;
  color: #30363c;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 2rem 0 1.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.85rem 1.2rem;
  border-radius: 0.35rem;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.primary {
  background: var(--canada);
  color: white;
}

.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.82);
  color: var(--steel);
}

.disclaimer {
  max-width: 560px;
  margin-top: 1.4rem;
  padding: 0.85rem 1.1rem;
  border-left: 4px solid var(--canada);
  border-radius: 8px;
  background: rgba(193, 18, 31, 0.06);
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.5;
}

.strategy-wheel {
  --orbit-r: 40cqmin;
  position: relative;
  display: grid;
  width: min(100%, 520px);
  aspect-ratio: 1;
  container-type: size;
  place-items: center;
  border: 1px solid rgba(33, 71, 97, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 253, 247, 0.98) 0 28%, rgba(255, 253, 247, 0.12) 29% 100%),
    conic-gradient(from 10deg, rgba(193, 18, 31, 0.42), rgba(33, 71, 97, 0.42), rgba(181, 109, 27, 0.38), rgba(193, 18, 31, 0.42));
  box-shadow: 0 28px 80px rgba(22, 26, 29, 0.18);
  isolation: isolate;
  animation: rise 700ms ease both;
  opacity: 1;
}

.strategy-wheel::before,
.strategy-wheel::after {
  position: absolute;
  border: 1px dashed rgba(33, 71, 97, 0.45);
  border-radius: 50%;
  content: "";
}

.strategy-wheel::before {
  inset: 14%;
}

.strategy-wheel::after {
  inset: 30%;
}

.wheel-center {
  position: relative;
  z-index: 2;
  display: grid;
  width: 42%;
  aspect-ratio: 1;
  place-items: center;
  padding: 1.2rem;
  border-radius: 50%;
  background: rgba(255, 253, 247, 0.96);
  box-shadow: inset 0 0 0 1px rgba(22, 26, 29, 0.16), 0 16px 50px rgba(22, 26, 29, 0.08);
  text-align: center;
}

.wheel-center span {
  color: var(--canada);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 800;
}

.wheel-center strong {
  color: var(--steel);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.78rem;
  line-height: 1.25;
}

.wheel-node {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  min-width: 7.2rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(22, 26, 29, 0.2);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.98);
  box-shadow: 0 14px 34px rgba(22, 26, 29, 0.14);
  color: #16384f;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-weight: 800;
  transform: translate(-50%, -50%) rotate(calc(var(--i) * 60deg))
    translateY(calc(-1 * var(--orbit-r))) rotate(calc(var(--i) * -60deg));
  transition: color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  animation: wheel-orbit 60s linear infinite;
  animation-delay: calc(var(--i) * -10s);
}

@keyframes wheel-orbit {
  from {
    transform: translate(-50%, -50%) rotate(0deg)
      translateY(calc(-1 * var(--orbit-r))) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg)
      translateY(calc(-1 * var(--orbit-r))) rotate(-360deg);
  }
}

.strategy-wheel:hover .wheel-node,
.strategy-wheel:focus-within .wheel-node {
  animation-play-state: paused;
}

.wheel-node:hover,
.wheel-node.active {
  border-color: var(--canada);
  color: var(--canada-dark);
  box-shadow: 0 0 0 3px rgba(193, 18, 31, 0.18), 0 18px 40px rgba(22, 26, 29, 0.2);
}

@media (prefers-reduced-motion: reduce) {
  .wheel-node {
    animation: none;
  }
}

/* Touch devices have no reliable hover to pause the orbit, so the pill would be
   a moving tap target. Keep the circular layout but stop the rotation. */
@media (hover: none) {
  .wheel-node {
    animation: none;
  }
}

/* Fallback for browsers without container query units: var(--orbit-r) would be
   invalid and collapse every pill onto the center, so place them statically. */
@supports not (width: 1cqmin) {
  .wheel-node {
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    animation: none;
    transform: none;
  }

  .node-1 {
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
  }

  .node-2 {
    top: 25%;
    right: -2%;
  }

  .node-3 {
    right: -2%;
    bottom: 25%;
  }

  .node-4 {
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
  }

  .node-5 {
    bottom: 25%;
    left: -2%;
  }

  .node-6 {
    top: 25%;
    left: -2%;
  }
}

.metrics-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.72);
}

.metrics-band article {
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border-right: 1px solid var(--line);
}

.metrics-band article:last-child {
  border-right: 0;
}

.metric-value {
  display: block;
  color: var(--canada-dark);
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  font-weight: 800;
  line-height: 0.9;
}

.metric-label {
  display: block;
  max-width: 13rem;
  margin-top: 0.8rem;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.3;
}

.section {
  padding: clamp(3.5rem, 8vw, 7rem) clamp(1rem, 6vw, 5rem);
}

.intro-grid,
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: end;
}

.intro-grid p:last-child,
.section-heading p {
  color: var(--muted);
  font-size: clamp(1.04rem, 1.6vw, 1.25rem);
  line-height: 1.55;
}

.pillar-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.pillar-list {
  display: grid;
  gap: 0.45rem;
  align-self: start;
}

.pillar-tab,
.filter {
  border: 1px solid rgba(22, 26, 29, 0.11);
  border-radius: 0.35rem;
  background: rgba(255, 253, 247, 0.72);
  color: var(--muted);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-weight: 800;
}

.pillar-tab {
  padding: 0.95rem 1rem;
  text-align: left;
}

.pillar-tab.active,
.filter.active {
  border-color: var(--canada);
  background: var(--canada);
  color: white;
}

.pillar-detail,
.simulator,
.tracker-card,
.comparison-card,
.goal-card,
.sector-card {
  border: 1px solid rgba(22, 26, 29, 0.12);
  border-radius: 0.5rem;
  background: rgba(255, 253, 247, 0.82);
  box-shadow: 0 16px 44px rgba(22, 26, 29, 0.08);
}

.pillar-detail {
  min-height: 390px;
  padding: clamp(1.5rem, 4vw, 3rem);
}

#pillar-kicker,
.status {
  display: inline-flex;
  margin-bottom: 1rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: var(--steel-soft);
  color: var(--steel);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
}

#pillar-summary {
  max-width: 820px;
  color: #30363c;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1.5;
}

.detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

ul {
  margin: 0;
  padding-left: 1.1rem;
}

li {
  margin: 0.55rem 0;
  color: var(--muted);
  line-height: 1.45;
}

.sectors,
.tracker {
  background: rgba(33, 71, 97, 0.06);
}

.sector-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.filter {
  padding: 0.75rem 0.95rem;
}

.sector-grid,
.comparison-grid,
.goal-grid,
.tracker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.sector-card,
.comparison-card,
.goal-card,
.tracker-card {
  padding: 1.2rem;
}

.sector-card {
  min-height: 210px;
}

.sector-card span,
.comparison-card span,
.goal-card span {
  color: var(--canada-dark);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sector-card h3,
.comparison-card h3,
.goal-card h3,
.tracker-card h3 {
  margin: 0.7rem 0;
  font-size: 1.35rem;
}

.sector-card p,
.comparison-card p,
.goal-card p,
.tracker-card p {
  color: var(--muted);
  line-height: 1.45;
}

.goal-card {
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease;
}

.goal-card:hover,
.goal-card.active {
  border-color: rgba(193, 18, 31, 0.5);
  transform: translateY(-3px);
}

.goal-card strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--steel);
  font-size: 2rem;
}

.comparison-card strong {
  display: block;
  margin: 0.7rem 0 0.4rem;
  color: var(--canada-dark);
  font-size: 2rem;
  line-height: 1;
}

.simulator {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: 1.5rem;
  align-items: center;
  margin-top: 1rem;
  padding: clamp(1.2rem, 4vw, 2rem);
}

.simulator label {
  display: flex;
  justify-content: space-between;
  color: var(--steel);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--canada);
}

.bar-track {
  height: 0.75rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--steel-soft);
}

.bar-track span {
  display: block;
  width: 60%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--canada), var(--gold));
  transition: width 180ms ease;
}

.sim-note {
  margin: 0;
  color: var(--muted);
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-size: 0.95rem;
}

.tracker-card {
  display: grid;
  gap: 0.5rem;
}

.tracker-card h3 {
  margin-bottom: 0;
}

.status.announced {
  background: #f4d8d8;
  color: var(--canada-dark);
}

.status.funded {
  background: #f1dfbd;
  color: #74420d;
}

.status.watch {
  background: #d7e6ef;
  color: var(--steel);
}

.sources {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(280px, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
}

.sources ol {
  margin: 0;
  padding-left: 1.4rem;
}

.sources a {
  color: var(--steel);
  font-weight: 800;
}

.site-footer {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 2rem clamp(1rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.ca-flag {
  width: 1.6rem;
  height: 1.2rem;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.byline {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.byline a {
  color: var(--steel);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--steel-soft);
}

.byline a:hover {
  border-bottom-color: var(--steel);
}

@keyframes rise {
  from {
    transform: translateY(18px) scale(0.98);
  }
  to {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 980px) {
  .hero,
  .intro-grid,
  .section-heading,
  .simulator,
  .sources {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .strategy-wheel {
    max-width: 560px;
    margin-inline: auto;
  }

  .metrics-band,
  .sector-grid,
  .comparison-grid,
  .goal-grid,
  .tracker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pillar-layout {
    grid-template-columns: 1fr;
  }

  .pillar-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    display: block;
    overflow: hidden;
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .hero-copy {
    width: min(100%, 22rem);
    max-width: 22rem;
  }

  .strategy-wheel {
    width: min(100%, 19rem);
    margin-top: 3rem;
    /* Smaller wheel + relatively wider pills: pull the orbit in so labels
       like "Compétences" stay inside the circle. */
    --orbit-r: 34cqmin;
  }

  h1 {
    max-width: 100%;
    font-size: 2.55rem;
    line-height: 0.94;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    justify-content: center;
    width: 100%;
  }

  .metrics-band,
  .sector-grid,
  .comparison-grid,
  .goal-grid,
  .tracker-grid,
  .detail-columns,
  .pillar-list {
    grid-template-columns: 1fr;
  }

  .metrics-band article {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .wheel-node {
    min-width: auto;
    padding: 0.48rem 0.56rem;
    font-size: 0.7rem;
  }
}
