:root {
  --blue: #063f86;
  --blue-dark: #052f67;
  --teal: #08aaa5;
  --orange: #f58220;
  --ink: #10294a;
  --muted: #5c6c82;
  --paper: #ffffff;
  --line: #d9e2ec;
  --page: #f6f8fb;
  --shadow: 0 14px 34px rgba(22, 47, 82, 0.09);
  --brand-gradient: linear-gradient(90deg, #08aaa5 0%, #0b67b2 44%, #f58220 72%, #f9bf3b 100%);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable both-edges;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--page);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='%231e1b4b' stroke-width='.4' stroke-opacity='.065'%3E%3Cpath d='M50 0 62 38 100 50 62 62 50 100 38 62 0 50 38 38Z'/%3E%3Cpath d='m15 15 15 15m55-15L70 30M15 85l15-15m55 15L70 70'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 100px 100px;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

button,
input,
select { font: inherit; }

button,
select { cursor: pointer; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 9px;
  color: #fff;
  background: var(--blue);
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-shell {
  position: relative;
  width: min(1120px, calc(100% - 30px));
  margin: 0 auto;
}

.site-shell::before,
.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: var(--brand-gradient);
  pointer-events: none;
}

.site-shell::before { display: none; }

.site-header {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 66px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: var(--mathsgo-entry-top) 0 8px;
  padding: 10px 12px 8px;
  border: 1px solid rgba(203, 216, 230, 0.92);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 24px rgba(22, 47, 82, 0.08);
}

.brand-link {
  position: relative;
  z-index: 1;
  grid-column: 2;
  display: block;
  width: 124px;
}

.brand-link img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 8px rgba(6, 63, 134, 0.08));
}

.header-home {
  position: relative;
  z-index: 1;
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #52647a;
  text-decoration: none;
  font-size: 0.91rem;
  font-weight: 700;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color .16s ease, background .16s ease, border-color .16s ease;
}

.header-home svg { width: 19px; height: 19px; }
.header-home:hover {
  border-color: #d8e4ef;
  color: var(--blue);
  background: #f7fafc;
}

.main-panel {
  margin-bottom: 24px;
  padding: clamp(16px, 1.9vw, 22px);
  border: 1px solid rgba(203, 216, 230, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.hero {
  max-width: 790px;
  margin: 0 auto 12px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--teal);
  font-size: 0.81rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: var(--blue-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 2.6vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.hero h1:focus { outline: none; }

.hero-lead {
  margin: 5px auto 0;
  color: var(--muted);
  font-size: clamp(.94rem, 1.3vw, 1.04rem);
  line-height: 1.25;
}

.domain-mobile-box,
.domain-box,
.facet-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 47px;
  padding: 0 14px;
  border: 1px solid #ced9e5;
  border-radius: 14px;
  background: #fff;
}
.domain-mobile-box label,
.domain-box label,
.facet-box label {
  flex: 0 0 auto;
  color: #6a788b;
  font-size: 0.83rem;
  font-weight: 800;
}
.domain-mobile-box select,
.domain-box select,
.facet-box select {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--blue-dark);
  background: transparent;
  font-weight: 780;
}

.catalogue-controls {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 10px;
}

.catalogue-controls.has-domain {
  grid-template-columns: minmax(240px, 1fr) minmax(190px, 250px) minmax(190px, 250px);
}

.catalogue-controls > * {
  min-width: 0;
}

.search-box,
.domain-box,
.facet-box { width: 100%; }

.auto-feature {
  position: relative;
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  padding: 7px 14px;
  overflow: hidden;
  border: 1px solid #a9c9e8;
  border-left: 6px solid var(--orange);
  border-radius: 18px;
  color: var(--ink);
  background: linear-gradient(120deg, #edf7ff 0%, #f8fbff 67%, #fff7ed 100%);
  text-decoration: none;
  box-shadow: 0 7px 18px rgba(6, 63, 134, 0.08);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.auto-feature::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -63px;
  width: 145px;
  height: 145px;
  border-radius: 50%;
  background: rgba(245, 130, 32, 0.09);
  pointer-events: none;
}

.auto-feature:hover {
  transform: translateY(-2px);
  border-color: #78a7d4;
  border-left-color: var(--orange);
  box-shadow: 0 12px 26px rgba(6, 63, 134, 0.13);
}

.auto-feature:focus-visible {
  outline: 3px solid rgba(8, 170, 165, 0.3);
  outline-offset: 3px;
}

.auto-feature-icon {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(6, 63, 134, 0.13);
  border-radius: 17px;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.88);
}

.auto-feature-icon svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auto-feature-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.auto-feature-copy strong {
  color: var(--blue-dark);
  font-size: clamp(1.15rem, 2vw, 1.38rem);
  line-height: 1.15;
}

.auto-feature-copy strong span {
  color: var(--orange);
}

.auto-feature-copy small {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.35;
}

.auto-feature-arrow {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: 1.2rem;
  font-weight: 850;
}

.auto-feature-arrow svg {
  display: block;
  width: 20px;
  height: 20px;
}

.search-box,
.type-box,
.domain-box,
.facet-box {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid #ced9e5;
  border-radius: 14px;
  background: #fff;
}

.search-box:focus-within,
.type-box:focus-within,
.domain-box:focus-within,
.facet-box:focus-within {
  border-color: #78a7d4;
  box-shadow: 0 0 0 3px rgba(11, 103, 178, 0.10);
}

.search-box svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  color: #66788d;
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 1rem;
}

.search-box input::-webkit-search-cancel-button,
.search-box input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search-clear {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  margin-right: -9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #53657a;
  background: #eef3f8;
  font-size: 1.15rem;
  line-height: 1;
}

.type-box label,
.domain-box label,
.facet-box label {
  flex: 0 0 auto;
  color: #6a788b;
  font-size: 0.83rem;
  font-weight: 800;
}

.type-box select,
.domain-box select,
.facet-box select {
  width: auto;
  max-width: 100%;
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--blue-dark);
  background: transparent;
  font-weight: 780;
}

.domain-nav {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 3px;
  margin: 0 0 25px;
  padding: 0 0 8px;
  border-bottom: 1px solid #e0e7ef;
  overflow-x: auto;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.domain-tab {
  position: relative;
  flex: 1 0 auto;
  min-height: 46px;
  padding: 8px 12px 10px;
  border: 0;
  color: #53657b;
  background: transparent;
  font-weight: 760;
  white-space: nowrap;
  scroll-snap-align: start;
}

.domain-tab::after {
  content: "";
  position: absolute;
  right: 13px;
  bottom: -9px;
  left: 13px;
  height: 3px;
  border-radius: 99px 99px 0 0;
  background: var(--tab-color, var(--blue));
  transform: scaleX(0);
  transition: transform 0.16s ease;
}

.domain-tab:hover,
.domain-tab[aria-pressed="true"] { color: var(--blue-dark); }
.domain-tab[aria-pressed="true"]::after { transform: scaleX(1); }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 16px;
  margin: 0 0 8px;
  text-align: center;
}

.section-heading h2 {
  margin: 0;
  color: var(--blue-dark);
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
}

.results-summary {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.results-summary:empty { display: none; }

.catalogue-breadcrumb {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  color: var(--muted);
  font-size: .91rem;
  line-height: 1.25;
}

.catalogue-breadcrumb button {
  min-height: 44px;
  padding: 7px 12px;
  border: 1px solid #d8e4ef;
  border-radius: 999px;
  color: var(--blue);
  background: #f7fafc;
  font-weight: 760;
  text-align: left;
  white-space: normal;
}

.catalogue-breadcrumb button:hover,
.catalogue-breadcrumb button:focus-visible {
  border-color: #a9c9e8;
  background: #edf5fc;
}

.breadcrumb-back > svg {
  width: 18px;
  height: 18px;
  margin-right: 4px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .16s ease;
}

.breadcrumb-back {
  display: inline-flex;
  align-items: center;
}

.breadcrumb-back:hover > svg,
.breadcrumb-back:focus-visible > svg { transform: translateX(-2px); }

.breadcrumb-separator {
  display: none;
}

.breadcrumb-current {
  min-width: 0;
  padding: 8px 10px;
  color: #40536b;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.notion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.resource-grid { display: block; }

.resource-group + .resource-group { margin-top: 30px; }

.resource-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e0e7ef;
}

.resource-group-heading h2 {
  margin: 0;
  color: var(--blue-dark);
  font-size: clamp(1.15rem, 1.8vw, 1.42rem);
  line-height: 1.25;
}

.resource-group-heading span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}

.resource-group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.search-direct {
  margin-bottom: 30px;
}

.search-direct-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.catalogue-deep-view .hero {
  max-width: none;
  margin: 0 0 14px;
  text-align: left;
}

.catalogue-deep-view .hero h1 {
  max-width: 900px;
  font-size: clamp(1.8rem, 2.7vw, 2.3rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.catalogue-deep-view .eyebrow,
.catalogue-deep-view .hero-lead,
.catalogue-deep-view .auto-feature,
.catalogue-deep-view .catalogue-controls,
.catalogue-deep-view .section-heading {
  display: none;
}

@media (min-width: 681px) {
  body.catalogue-is-deep .site-shell {
    margin-top: var(--mathsgo-entry-top);
    overflow: hidden;
    border: 1px solid rgba(203, 216, 230, 0.9);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow);
  }

  body.catalogue-is-deep .site-shell::before {
    display: block;
    z-index: 1;
  }

  body.catalogue-is-deep .site-header {
    min-height: 64px;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 18px;
    margin: 0;
    padding: 6px 20px 4px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.catalogue-is-deep .site-header::before { display: none; }

  body.catalogue-is-deep .brand-link {
    grid-column: 1;
    width: 124px;
  }

  body.catalogue-is-deep .site-header > .catalogue-breadcrumb {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    margin: 0;
    justify-self: start;
  }

  body.catalogue-is-deep .header-home { display: none; }

  body.catalogue-is-deep .main-panel {
    margin-bottom: 0;
    padding-top: 9px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
}

.domain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.catalogue-first-paint-shell {
  contain: layout paint;
}

.catalogue-shell-icon {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 52px;
  border: 1px solid color-mix(in srgb, var(--accent, var(--blue)) 24%, #d7e0e9);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--soft, #eef5fb), #fff 72%);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .48);
}

.catalogue-shell-icon::before,
.catalogue-shell-icon::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, var(--blue)) 34%, #fff);
}

.catalogue-shell-icon::before { top: 15px; }
.catalogue-shell-icon::after { top: 27px; right: 22px; }

.catalogue-shell-card .domain-card-arrow {
  width: 9px;
  height: 9px;
  border: solid var(--accent, var(--blue));
  border-width: 2px 2px 0 0;
  font-size: 0;
  transform: rotate(45deg);
}

@media (max-width: 680px) {
  .catalogue-shell-icon {
    width: 53px;
    height: 45px;
    border-radius: 12px;
  }

  .catalogue-shell-icon::before,
  .catalogue-shell-icon::after {
    left: 10px;
    right: 10px;
  }

  .catalogue-shell-icon::before { top: 13px; }
  .catalogue-shell-icon::after { top: 23px; right: 18px; }
}

.domain-card {
  position: relative;
  min-width: 0;
  min-height: 92px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  overflow: hidden;
  border: 1px solid #d7e0e9;
  border-left: 6px solid var(--accent, var(--blue));
  border-radius: 17px;
  color: inherit;
  background: #fff;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(15, 40, 72, .05);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.domain-card::after {
  content: "";
  position: absolute;
  right: -44px;
  bottom: -58px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--soft, #eef5fb);
  opacity: .78;
  pointer-events: none;
}

.domain-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent, var(--blue)) 45%, #d7e0e9);
  box-shadow: 0 12px 25px rgba(15, 40, 72, .11);
}

.domain-card-disabled,
.notion-card-disabled {
  cursor: default;
  opacity: 0.68;
}

.domain-card-disabled:hover,
.notion-card-disabled:hover {
  transform: none;
  border-color: #d7e0e9;
  box-shadow: 0 4px 10px rgba(15, 40, 72, .05);
}

.domain-card-secondary {
  grid-column: 2;
  min-height: 92px;
  grid-template-columns: 52px minmax(0, 1fr) 18px;
  justify-content: stretch;
  column-gap: 10px;
  background: linear-gradient(135deg, #f4fbf5, #fff);
}

.domain-card-secondary .domain-card-arrow {
  position: relative;
  top: auto;
  right: auto;
  transform: none;
}

.domain-card-icon {
  position: relative;
  z-index: 1;
  width: 54px;
  height: 46px;
  display: grid;
  place-items: center;
}

.domain-card-icon svg { width: 100%; height: 100%; overflow: visible; }
[data-domain-card="proportionnalite-mesures"] {
  grid-template-columns: 72px minmax(0, 1fr) 18px;
}
[data-domain-card="proportionnalite-mesures"] .domain-card-icon {
  width: 70px;
  height: 50px;
}
[data-domain-card="proportionnalite-mesures"] .domain-card-icon svg {
  transform: scale(1.08);
  transform-origin: center;
}
[data-domain-card="geometrie"],
[data-domain-card="donnees"] {
  grid-template-columns: 72px minmax(0, 1fr) 18px;
}
[data-domain-card="geometrie"] .domain-card-icon {
  width: 72px;
  height: 54px;
}
[data-domain-card="geometrie"] .domain-card-icon svg {
  width: calc(100% - 2px);
  height: auto;
  aspect-ratio: 1;
  display: block;
  transform: translateY(-5px);
}
[data-domain-card="donnees"] .domain-card-icon {
  width: 68px;
  height: 54px;
  justify-self: center;
}
[data-domain-card="donnees"] .mathsgo-mosaic-menu-icon {
  position: relative;
  top: -5px;
  filter: drop-shadow(0 2px 2px rgba(15, 40, 72, .14));
}
.domain-card-copy { position: relative; z-index: 1; min-width: 0; }
.domain-card-copy strong { display: block; color: #16304f; font-size: 1.02rem; line-height: 1.18; }
.domain-card-copy small { display: block; margin-top: 4px; color: #64758a; font-size: .8rem; line-height: 1.25; }
.domain-card-copy em { display: block; margin-top: 5px; color: var(--accent, var(--blue)); font-size: .74rem; font-style: normal; font-weight: 800; }
.domain-card-arrow { position: relative; z-index: 1; color: var(--accent, var(--blue)); font-size: 1.35rem; font-weight: 800; }

.notion-card,
.resource-card,
.resource-family-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d7e0e9;
  border-top: 5px solid var(--accent, var(--blue));
  border-radius: 15px;
  color: inherit;
  background: #fff;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(15, 40, 72, 0.045);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.notion-card {
  min-height: 142px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 17px 17px 15px;
}

.notion-card::after,
.resource-card::after,
.resource-family-card::after {
  content: "";
  position: absolute;
  right: -32px;
  bottom: -42px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--soft, #eef5fb);
  opacity: 0.72;
  pointer-events: none;
}

.notion-card:hover,
.resource-card:hover,
.resource-family-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent, var(--blue)) 42%, #d7e0e9);
  box-shadow: 0 11px 23px rgba(15, 40, 72, 0.11);
}

.notion-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.notion-icon {
  width: 58px;
  height: 47px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
}

.notion-icon > svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.08));
}

[data-notion-card="puissances"] .notion-icon > svg {
  transform: scale(1.18);
  transform-origin: center;
}

/* Le dessin de Pythagore occupe toute la hauteur de son repère : son titre
   suit donc exactement ce même axe, sans le surplus d’interligne commun. */
[data-notion-card="pythagore"] .notion-top > h3 {
  align-self: center;
  line-height: 1;
}

.notion-icon.collection-thumbnail {
  width: 98px;
  height: 64px;
  flex-basis: 98px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent, var(--blue)) 22%, #d7e0e9);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 3px 9px rgba(15, 40, 72, 0.08);
}

.collection-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.notion-card h3 {
  margin: 0;
  color: #162e4e;
  font-size: 1.08rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.collection-card {
  background: linear-gradient(145deg, #fff 0%, var(--soft, #eef5fb) 165%);
}

.collection-label {
  position: relative;
  z-index: 1;
  align-self: flex-start;
  margin: 0 0 9px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--accent, var(--blue));
  background: var(--soft, #eef5fb);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .045em;
  line-height: 1;
  text-transform: uppercase;
}

.notion-card p {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  color: #637287;
  font-size: 0.9rem;
  line-height: 1.4;
}

.notion-count {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 8px;
  color: var(--accent, var(--blue));
  font-size: .76rem;
  font-weight: 800;
}

.resource-card {
  min-height: 118px;
  display: grid;
  grid-template-columns: 48px 1fr 20px;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.resource-card-visual {
  grid-template-columns: minmax(0, 1fr) 20px;
  align-items: start;
  align-content: start;
  gap: 0 12px;
  padding: 0 16px 16px;
}

.resource-thumbnail {
  position: relative;
  z-index: 1;
  grid-column: 1 / -1;
  height: 158px;
  margin: 0 -16px 15px;
  overflow: hidden;
  border-bottom: 1px solid #d7e0e9;
  background: #f8fafc;
}

.resource-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.catalogue-thumbnail-picture {
  display: block;
  width: 100%;
  height: 100%;
}

.collection-card-visual {
  min-height: 320px;
  justify-content: flex-start;
  padding: 0 17px 15px;
  overflow: hidden;
}

.collection-card-visual .collection-card-thumbnail {
  width: calc(100% + 34px);
  height: auto;
  aspect-ratio: 16 / 10;
  margin: 0 -17px 13px;
  padding: clamp(12px, 3vw, 18px);
  flex: 0 0 auto;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(300px 180px at 15% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 250, 255, 0.86));
}

.collection-card-visual .collection-card-thumbnail img {
  object-fit: cover;
  border: 1.5px solid rgba(10, 61, 134, 0.14);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(10, 61, 134, 0.11);
}

.collection-card-visual .notion-count {
  margin-top: auto;
  padding-top: 8px;
}

.collection-resource-icon {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ffffff, var(--soft, #eef5fb));
}

.collection-resource-icon svg {
  width: min(46%, 160px);
  height: min(68%, 105px);
  overflow: visible;
  filter: drop-shadow(0 2px 2px rgba(15, 40, 72, 0.1));
}

.resource-card-visual .resource-copy {
  grid-column: 1;
  align-self: center;
}

.resource-card-visual .resource-arrow {
  grid-column: 2;
  align-self: center;
}

.resource-description {
  display: block;
  margin-top: 6px;
  color: #637287;
  font-size: .84rem;
  line-height: 1.38;
}

.resource-family-card {
  min-height: 118px;
}

.resource-family-summary {
  position: relative;
  z-index: 1;
  min-height: 113px;
  display: grid;
  grid-template-columns: 48px 1fr 24px;
  align-items: center;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.resource-family-card-visual .resource-family-summary {
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: start;
  gap: 0 12px;
  padding: 0 16px 16px;
}

.resource-family-card-visual .resource-copy {
  grid-column: 1;
  align-self: center;
}

.resource-family-card-visual .resource-family-toggle {
  grid-column: 2;
  align-self: center;
}

.resource-family-summary::-webkit-details-marker { display: none; }

.resource-family-summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent, var(--blue)) 32%, transparent);
  outline-offset: -4px;
  border-radius: 10px;
}

.resource-family-toggle {
  color: var(--accent, var(--blue));
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1;
  transition: transform .16s ease;
}

.resource-family-card[open] .resource-family-toggle { transform: rotate(180deg); }

.resource-variants {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 5px;
  padding: 0 12px 12px;
}

.resource-variants a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #dbe4eb;
  border-radius: 9px;
  color: #27425f;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(25, 55, 83, .06);
  font-size: .86rem;
  font-weight: 750;
  line-height: 1.25;
  text-decoration: none;
}

.resource-variants a:hover,
.resource-variants a:focus-visible {
  color: var(--accent, var(--blue));
  border-color: color-mix(in srgb, var(--accent, var(--blue)) 28%, #dbe4eb);
  background: #f4f7fa;
}

.resource-type-icon {
  position: relative;
  z-index: 1;
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--accent, var(--blue));
  background: var(--soft, #eef5fb);
}

.resource-type-icon svg { width: 30px; height: 30px; }
.resource-copy { position: relative; z-index: 1; min-width: 0; }

.resource-copy h3 {
  margin: 0;
  color: #16304f;
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.resource-meta {
  display: block;
  margin-top: 6px;
  color: #68788c;
  font-size: 0.82rem;
  line-height: 1.3;
}

.resource-uses {
  margin-top: 4px;
  color: #7a8798;
  font-size: .74rem;
  font-weight: 700;
}

.resource-arrow {
  position: relative;
  z-index: 1;
  color: var(--accent, var(--blue));
  font-size: 1.25rem;
  transition: transform 0.16s ease;
}

.resource-card:hover .resource-arrow { transform: translateX(3px); }

.empty-state {
  grid-column: 1 / -1;
  padding: 30px;
  border: 1px dashed #c9d5e2;
  border-radius: 14px;
  color: #65758a;
  background: #f9fbfd;
  text-align: center;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-footer {
  min-height: 56px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px 9px;
  padding: 8px 12px 22px;
  color: #718096;
  font-size: 0.84rem;
  text-align: center;
}

.site-footer a,
.site-footer button {
  padding: 0;
  border: 0;
  color: #526d8d;
  background: transparent;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (max-width: 920px) {
  .notion-grid,
  .resource-group-grid,
  .search-direct-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .domain-tab { padding-inline: 15px; }
  .catalogue-controls.has-domain { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalogue-controls.has-domain .search-box { grid-column: 1 / -1; }
  .domain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .domain-card-secondary { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .site-shell { width: min(100% - 20px, 1180px); }
  .site-header { min-height: 87px; grid-template-columns: 1fr auto 1fr; }
  .brand-link { grid-column: 2; justify-self: center; width: 145px; }
  .header-home { grid-column: 3; min-width: 48px; min-height: 48px; padding: 9px; }
  .main-panel { padding: 20px 15px 24px; border-radius: 21px; }
  .hero { margin-bottom: 17px; }
  .catalogue-controls { grid-template-columns: 1fr; gap: 9px; }
  .catalogue-controls.has-domain { grid-template-columns: 1fr; }
  .catalogue-controls.has-domain .search-box { grid-column: auto; }
  .auto-feature {
    min-height: 86px;
    grid-template-columns: 54px minmax(0, 1fr) 34px;
    gap: 12px;
    padding: 11px 13px;
    border-left-width: 5px;
  }
  .auto-feature-icon { width: 54px; height: 54px; border-radius: 15px; }
  .auto-feature-icon svg { width: 43px; height: 43px; }
  .auto-feature-copy strong span {
    display: block;
    width: max-content;
    margin-top: 2px;
    font-size: .86em;
    white-space: nowrap;
  }
  .auto-feature-arrow { width: 34px; height: 34px; }
  .search-box,
  .domain-box,
  .facet-box { width: 100%; min-width: 0; overflow: hidden; }
  .type-box,
  .domain-box,
  .facet-box { min-height: 47px; }
  .domain-nav { display: none; }
  .domain-mobile-box { display: none; }
  .domain-nav {
    gap: 7px;
    margin-right: -15px;
    margin-left: -15px;
    padding: 0 15px 5px;
    border-bottom: 0;
    scrollbar-width: none;
  }
  .domain-nav::-webkit-scrollbar { display: none; }
  .domain-tab {
    min-height: 40px;
    padding: 7px 13px;
    border: 1px solid #d6e0ea;
    border-radius: 999px;
    background: #fff;
  }
  .domain-tab::after { display: none; }
  .domain-tab[aria-pressed="true"] {
    border-color: var(--tab-color, var(--blue));
    color: #fff;
    background: var(--tab-color, var(--blue));
  }
  .notion-grid,
  .resource-group-grid,
  .search-direct-grid { grid-template-columns: 1fr; gap: 10px; }
  .domain-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .domain-card {
    min-height: 164px;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 8px;
    padding: 13px 12px;
    border-left-width: 1px;
    border-top: 5px solid var(--accent, var(--blue));
    text-align: center;
  }
  .domain-card-icon { width: 62px; height: 52px; margin: 0 auto; }
  [data-domain-card="proportionnalite-mesures"] {
    grid-template-columns: 1fr;
  }
  [data-domain-card="proportionnalite-mesures"] .domain-card-icon {
    width: 94px;
    height: 54px;
  }
  [data-domain-card="geometrie"] .domain-card-icon {
    width: 62px;
    height: 52px;
    overflow: hidden;
  }
  [data-domain-card="geometrie"] .domain-card-icon svg {
    width: 52px;
    height: 52px;
    max-width: 100%;
    max-height: 100%;
    transform: none;
  }
  [data-domain-card="donnees"] .domain-card-icon {
    width: 70px;
    height: 54px;
  }
  [data-domain-card="informatique"] .domain-card-icon svg {
    transform: scale(1.1);
    transform-origin: center;
  }
  .domain-card-copy strong { font-size: .98rem; }
  .domain-card-copy small { display: none; }
  .domain-card-copy em { margin-top: 6px; }
  .domain-card-arrow { display: none; }
  .domain-card-secondary {
    grid-column: 1 / -1;
    min-height: 128px;
    grid-template-columns: 1fr;
    align-content: center;
    text-align: center;
  }
  .domain-card-secondary .domain-card-icon { width: 60px; height: 50px; }
  .domain-card-secondary .domain-card-copy small { display: block; }
  .notion-card { min-height: 122px; padding: 14px 15px; }
  .notion-icon { width: 53px; height: 43px; flex-basis: 53px; }
  .notion-icon.collection-thumbnail { width: 82px; height: 54px; flex-basis: 82px; }
  .catalogue-deep-view .hero { margin-bottom: 19px; }
  .catalogue-deep-view > .catalogue-breadcrumb { margin-bottom: 11px; }
  .catalogue-breadcrumb {
    width: 100%;
    gap: 0;
    font-size: .86rem;
  }
  .catalogue-breadcrumb button,
  .breadcrumb-current { padding-inline: 8px; }
  .resource-group + .resource-group { margin-top: 25px; }
  .resource-group-heading { align-items: flex-start; }
  .section-heading { align-items: center; }
  .site-footer { padding-bottom: max(18px, env(safe-area-inset-bottom)); }

  body.catalogue-is-deep .site-header {
    min-height: 64px;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    padding: 6px 8px;
  }
  body.catalogue-is-deep .brand-link {
    grid-column: 1;
    width: 98px;
    justify-self: start;
  }
  body.catalogue-is-deep .site-header > .catalogue-breadcrumb {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    margin: 0;
    font-size: .8rem;
  }
  body.catalogue-is-deep .site-header > .catalogue-breadcrumb:has(.breadcrumb-parent) {
    display: block;
  }
  body.catalogue-is-deep .site-header > .catalogue-breadcrumb:has(.breadcrumb-parent) .breadcrumb-back {
    display: none;
  }
  body.catalogue-is-deep .breadcrumb-back {
    min-height: 44px;
    padding: 5px 9px;
    white-space: nowrap;
  }
  body.catalogue-is-deep .breadcrumb-parent {
    position: relative;
    min-width: 0;
    min-height: 44px;
    width: 100%;
    padding: 5px 10px 5px 31px;
    overflow: hidden;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #40536b;
    font-weight: 720;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: left;
  }
  body.catalogue-is-deep .breadcrumb-parent::before {
    content: "←";
    position: absolute;
    top: 50%;
    left: 9px;
    color: #0b5fc0;
    font-size: 1.15rem;
    font-weight: 850;
    line-height: 1;
    transform: translateY(-50%);
  }
  body.catalogue-is-deep .breadcrumb-parent:hover,
  body.catalogue-is-deep .breadcrumb-parent:focus-visible {
    border-color: transparent;
    background: #edf5fc;
  }
  body.catalogue-is-deep .header-home { display: none; }
  body.catalogue-is-deep .main-panel { padding-top: 10px; }
}

@media (max-width: 420px) {
  .header-home span { display: none; }
  .header-home svg { width: 27px; height: 27px; }
  .hero h1 { font-size: 2rem; }
  .auto-feature { grid-template-columns: 52px minmax(0, 1fr) 30px; gap: 10px; padding: 12px; }
  .auto-feature-icon { width: 52px; height: 52px; border-radius: 14px; }
  .auto-feature-icon svg { width: 41px; height: 41px; }
  .auto-feature-copy strong { font-size: 1.08rem; }
  .auto-feature-copy small { font-size: .82rem; }
  .auto-feature-arrow { width: 30px; height: 30px; font-size: 1rem; }
  .search-box { min-height: 49px; }
  .type-box label,
  .domain-box label,
  .facet-box label { display: none; }
  .domain-card { min-height: 155px; }
}

/* Page d'entrée sur ordinateur : l'ancienne composition en deux colonnes,
   resserrée en hauteur sans réduire les illustrations des domaines. */
@media (min-width: 921px) {
  body:not(.catalogue-is-deep) {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding-block: 0 16px;
  }

  body.catalogue-is-deep .site-header {
    min-height: 64px;
    padding: 6px 20px 4px;
  }

  body.catalogue-is-deep .brand-link {
    width: 132px;
  }

  body:not(.catalogue-is-deep) .site-shell {
    position: relative;
    margin-block: var(--mathsgo-entry-top) auto;
    margin-inline: auto;
    overflow: hidden;
    border: 1px solid rgba(203, 216, 230, 0.9);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow);
  }

  body:not(.catalogue-is-deep) .site-shell::before {
    display: block;
    z-index: 4;
  }

  body:not(.catalogue-is-deep) .site-header {
    position: absolute;
    inset: 0 0 auto;
    z-index: 3;
    min-height: 64px;
    margin: 0;
    padding: 6px 20px 4px;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
  }

  body:not(.catalogue-is-deep) .site-header::before { display: none; }

  body:not(.catalogue-is-deep) .brand-link {
    grid-column: 1;
    justify-self: start;
    width: 132px;
    pointer-events: auto;
  }

  body:not(.catalogue-is-deep) .header-home {
    pointer-events: auto;
  }

  body:not(.catalogue-is-deep) .main-panel {
    margin-bottom: 0;
    padding: 12px 22px 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body:not(.catalogue-is-deep) .hero { margin-bottom: 10px; }
  body:not(.catalogue-is-deep) .hero h1 { font-size: clamp(1.9rem, 2.8vw, 2.45rem); }
  body:not(.catalogue-is-deep) .hero-lead {
    margin-top: 5px;
    font-size: clamp(.96rem, 1.25vw, 1.05rem);
    line-height: 1.25;
  }

  body:not(.catalogue-is-deep) .auto-feature {
    min-height: 68px;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    gap: 13px;
    margin-bottom: 8px;
    padding: 7px 15px;
  }

  body:not(.catalogue-is-deep) .auto-feature-icon {
    width: 54px;
    height: 54px;
  }

  body:not(.catalogue-is-deep) .auto-feature-icon svg {
    width: 42px;
    height: 42px;
  }

  body:not(.catalogue-is-deep) .catalogue-controls { margin-bottom: 8px; }
  body:not(.catalogue-is-deep) .section-heading { margin-bottom: 9px; }
  body:not(.catalogue-is-deep) .section-heading h2 { font-size: clamp(1.3rem, 1.8vw, 1.55rem); }

  body:not(.catalogue-is-deep) .domain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body:not(.catalogue-is-deep) .domain-card {
    min-height: 108px;
    grid-template-columns: 72px minmax(0, 1fr) 20px;
    gap: 12px;
    padding: 9px 14px;
  }

  body:not(.catalogue-is-deep) .domain-card-icon,
  body:not(.catalogue-is-deep) .catalogue-shell-icon {
    width: 70px;
    height: 58px;
  }

  body:not(.catalogue-is-deep) .domain-card:not(.domain-card-secondary) > .domain-card-icon {
    transform: translateX(9px);
  }

  /* Ajuster le poids visuel des deux dessins les plus fins sans déplacer
     les textes ni modifier la hauteur des cartes. */
  body:not(.catalogue-is-deep) [data-domain-card="donnees"] .domain-card-icon svg {
    transform: scale(1.1);
    transform-origin: center;
  }

  body:not(.catalogue-is-deep) [data-domain-card="informatique"] .domain-card-icon svg {
    transform: scale(1.16);
    transform-origin: center;
  }

  body:not(.catalogue-is-deep) [data-domain-card="proportionnalite-mesures"] {
    grid-template-columns: 92px minmax(0, 1fr) 20px;
  }

  body:not(.catalogue-is-deep) [data-domain-card="proportionnalite-mesures"] .domain-card-icon {
    width: 90px;
    height: 62px;
  }

  body:not(.catalogue-is-deep) [data-domain-card="donnees"] .domain-card-icon {
    width: 78px;
    height: 60px;
  }

  body:not(.catalogue-is-deep) .domain-card-copy strong {
    font-size: 1.08rem;
    line-height: 1.18;
  }

  body:not(.catalogue-is-deep) .domain-card-copy small {
    margin-top: 3px;
    font-size: .84rem;
    line-height: 1.25;
  }

  body:not(.catalogue-is-deep) .domain-card-copy em {
    margin-top: 4px;
    font-size: .74rem;
  }

  body:not(.catalogue-is-deep) .domain-card-secondary {
    grid-column: 1 / -1;
    min-height: 100px;
    grid-template-columns: 70px fit-content(430px);
    justify-content: center;
    column-gap: 10px;
  }

  body:not(.catalogue-is-deep) .domain-card-secondary .domain-card-arrow {
    position: absolute;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
  }
}

/* Le cadre extérieur partage toujours ses deux bords avec l'accueil sur
   ordinateur, y compris lorsque le navigateur est peu haut. */
@media (min-width: 921px) {
  body:not(.catalogue-is-deep):not(.catalogue-is-search) .site-shell {
    height: var(--mathsgo-entry-card-height);
  }

  body.catalogue-is-search .site-shell {
    min-height: var(--mathsgo-entry-card-height);
    height: auto;
  }
}

/* Sur les ordinateurs assez hauts, le catalogue gagne les quelques pixels
   nécessaires en resserrant uniquement ses rangées, sans réduire les dessins
   ni les textes. */
@media (min-width: 921px) and (min-height: 821px) {
  body:not(.catalogue-is-deep) .domain-card {
    min-height: 99px;
  }

  body:not(.catalogue-is-deep) .domain-card-secondary {
    min-height: 96px;
  }
}

/* Ordinateurs portables : tout le menu reste visible sans rapetisser les dessins. */
@media (min-width: 921px) and (max-height: 820px) {
  body.catalogue-is-deep .site-header,
  body:not(.catalogue-is-deep) .site-header { min-height: 58px; padding: 4px 16px 2px; }
  body.catalogue-is-deep .brand-link,
  body:not(.catalogue-is-deep) .brand-link { width: 118px; }
  body:not(.catalogue-is-deep) .main-panel { padding: 10px 18px 14px; }
  body:not(.catalogue-is-deep) .hero { margin-bottom: 7px; }
  body:not(.catalogue-is-deep) .hero h1 { font-size: 1.95rem; }
  body:not(.catalogue-is-deep) .hero-lead { margin-top: 3px; font-size: .96rem; }
  body:not(.catalogue-is-deep) .auto-feature {
    min-height: 56px;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 11px;
    margin-bottom: 6px;
    padding: 4px 12px;
  }
  body:not(.catalogue-is-deep) .auto-feature-icon { width: 46px; height: 46px; border-radius: 14px; }
  body:not(.catalogue-is-deep) .auto-feature-icon svg { width: 37px; height: 37px; }
  body:not(.catalogue-is-deep) .catalogue-controls { margin-bottom: 6px; }
  body:not(.catalogue-is-deep) .search-box { min-height: 38px; }
  body:not(.catalogue-is-deep) .section-heading { margin-bottom: 6px; }
  body:not(.catalogue-is-deep) .section-heading h2 { font-size: 1.27rem; }
  body:not(.catalogue-is-deep) .domain-grid { gap: 7px; }
  body:not(.catalogue-is-deep) .domain-card {
    min-height: 94px;
    grid-template-columns: 68px minmax(0, 1fr) 18px;
    gap: 8px;
    padding: 6px 11px;
  }
  body:not(.catalogue-is-deep) .domain-card-icon,
  body:not(.catalogue-is-deep) .catalogue-shell-icon { width: 70px; height: 58px; }
  body:not(.catalogue-is-deep) [data-domain-card="proportionnalite-mesures"] {
    grid-template-columns: 86px minmax(0, 1fr) 18px;
  }
  body:not(.catalogue-is-deep) [data-domain-card="proportionnalite-mesures"] .domain-card-icon {
    width: 90px;
    height: 60px;
  }
  body:not(.catalogue-is-deep) [data-domain-card="donnees"] .domain-card-icon { width: 78px; height: 60px; }
  body:not(.catalogue-is-deep) .domain-card-copy strong { font-size: 1.01rem; }
  body:not(.catalogue-is-deep) .domain-card-copy small { margin-top: 2px; font-size: .78rem; line-height: 1.18; }
  body:not(.catalogue-is-deep) .domain-card-copy em { margin-top: 2px; font-size: .7rem; }
  body:not(.catalogue-is-deep) .domain-card-secondary {
    min-height: 88px;
    grid-template-columns: 66px fit-content(420px);
  }
}

@media (min-width: 1600px) and (min-height: 1000px) {
  body.catalogue-is-deep .site-header,
  body:not(.catalogue-is-deep) .site-header { min-height: 76px; padding-inline: 28px; }
  body.catalogue-is-deep .brand-link,
  body:not(.catalogue-is-deep) .brand-link { width: 158px; }
  body:not(.catalogue-is-deep) .main-panel { padding: 24px 28px 28px; }
  body:not(.catalogue-is-deep) .hero { margin-bottom: 16px; }
  body:not(.catalogue-is-deep) .hero h1 { font-size: 2.8rem; }
  body:not(.catalogue-is-deep) .hero-lead { font-size: 1.1rem; }
  body:not(.catalogue-is-deep) .auto-feature {
    min-height: 82px;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    padding: 10px 20px;
  }
  body:not(.catalogue-is-deep) .auto-feature-icon { width: 62px; height: 62px; }
  body:not(.catalogue-is-deep) .auto-feature-icon svg { width: 48px; height: 48px; }
  body:not(.catalogue-is-deep) .domain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  body:not(.catalogue-is-deep) .domain-card {
    min-height: 120px;
    grid-template-columns: 78px minmax(0, 1fr) 22px;
    gap: 14px;
    padding: 13px 18px;
  }
  body:not(.catalogue-is-deep) .domain-card-secondary {
    grid-column: 1 / -1;
    min-height: 106px;
    grid-template-columns: 78px fit-content(470px);
  }
  body:not(.catalogue-is-deep) .domain-card-icon,
  body:not(.catalogue-is-deep) .catalogue-shell-icon { width: 76px; height: 64px; }
  body:not(.catalogue-is-deep) [data-domain-card="proportionnalite-mesures"] {
    grid-template-columns: 100px minmax(0, 1fr) 22px;
  }
  body:not(.catalogue-is-deep) [data-domain-card="proportionnalite-mesures"] .domain-card-icon {
    width: 98px;
    height: 68px;
  }
  body:not(.catalogue-is-deep) [data-domain-card="donnees"] .domain-card-icon { width: 86px; height: 66px; }
  body:not(.catalogue-is-deep) .domain-card-copy strong { font-size: 1.14rem; }
  body:not(.catalogue-is-deep) .domain-card-copy small { margin-top: 6px; font-size: .88rem; line-height: 1.35; }
  body:not(.catalogue-is-deep) .domain-card-copy em { margin-top: 8px; font-size: .77rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Les deux dernières cartes sont des espaces transversaux : elles forment une
   paire équilibrée sous les six domaines mathématiques, sur tous les écrans. */
.domain-card-secondary { grid-column: auto; }

[data-domain-card="cps"] .domain-card-icon svg {
  transform: scale(1.08);
  transform-origin: center;
}

@media (min-width: 921px) {
  body:not(.catalogue-is-deep) .domain-card-secondary {
    grid-column: auto;
    min-height: 108px;
    grid-template-columns: 72px minmax(0, 1fr) 20px;
    justify-content: stretch;
    column-gap: 12px;
  }

  body:not(.catalogue-is-deep) .domain-card-secondary .domain-card-arrow {
    position: relative;
    top: auto;
    right: auto;
    transform: none;
  }
}

@media (min-width: 921px) and (max-height: 820px) {
  body:not(.catalogue-is-deep) .domain-card-secondary {
    min-height: 94px;
    grid-template-columns: 68px minmax(0, 1fr) 18px;
    gap: 8px;
  }
}

@media (min-width: 1600px) and (min-height: 1000px) {
  body:not(.catalogue-is-deep) .domain-card-secondary {
    min-height: 120px;
    grid-template-columns: 78px minmax(0, 1fr) 22px;
    gap: 14px;
  }
}

@media (max-width: 920px) {
  .domain-card-secondary { grid-column: auto; }
}

@media (max-width: 680px) {
  .domain-card-secondary {
    grid-column: auto;
    min-height: 164px;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 8px;
    text-align: center;
  }

  .domain-card-secondary .domain-card-icon {
    width: 62px;
    height: 52px;
  }

  .domain-card-secondary .domain-card-copy small { display: none; }
}

@media (max-width: 420px) {
  .domain-card-secondary { min-height: 155px; }
}

/* Sur la composition d'ordinateur standard, les quatre rangées tiennent dans
   le cadre commun. La grande composition (au moins 1600 × 1000) conserve ses
   dimensions propres et utilise le cadre partagé de 930 px. */
@media (min-width: 921px) and (min-height: 821px) and (max-width: 1599px),
       (min-width: 921px) and (min-height: 821px) and (max-height: 999px) {
  body:not(.catalogue-is-deep) .domain-card,
  body:not(.catalogue-is-deep) .domain-card-secondary {
    min-height: 99px;
  }
}

/* La collection Splat! conserve la structure du catalogue tout en retrouvant
   une identité d’univers forte et le crédit visible du concept original. */
.catalogue-deep-view.catalogue-splat-view .hero {
  min-height: 154px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  grid-template-areas:
    "title mark"
    "lead mark";
  align-items: center;
  gap: 4px 28px;
  margin-bottom: 24px;
  padding: 20px 24px;
  overflow: hidden;
  border: 1px solid #d9c8ef;
  border-left: 7px solid #7b42b4;
  border-radius: 22px;
  background:
    radial-gradient(circle at 85% 20%, rgba(245, 158, 11, .18), transparent 28%),
    linear-gradient(120deg, #fbf8ff 0%, #f5edff 55%, #fff8ed 100%);
  box-shadow: 0 12px 28px rgba(64, 35, 100, .1);
}

.catalogue-deep-view.catalogue-splat-view .hero h1 {
  grid-area: title;
  max-width: none;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 950;
  line-height: .92;
  letter-spacing: -.055em;
  color: #3f2165;
}

.catalogue-deep-view.catalogue-splat-view .hero-lead {
  grid-area: lead;
  display: block;
  max-width: 660px;
  margin: 10px 0 0;
  color: #5f4d72;
  font-size: 1rem;
  font-weight: 680;
  line-height: 1.35;
}

.splat-universe-mark {
  grid-area: mark;
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 12px;
  border: 1px solid rgba(123, 66, 180, .18);
  border-radius: 18px;
  background: rgba(255, 255, 255, .78);
}

.splat-universe-mark[hidden] { display: none; }
.splat-universe-mark picture { display: block; width: 126px; }
.splat-universe-mark img { display: block; width: 100%; height: auto; border-radius: 11px; }
.splat-universe-mark p { margin: 0; color: #64748b; font-size: .77rem; line-height: 1.35; }
.splat-universe-mark p span,
.splat-universe-mark p strong { display: block; }
.splat-universe-mark p strong { margin-top: 3px; color: #d97706; font-weight: 900; }
.splat-universe-mark a { color: #5b21b6; font-weight: 850; text-decoration-thickness: 1px; text-underline-offset: 2px; }

@media (max-width: 680px) {
  .catalogue-deep-view.catalogue-splat-view .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-areas: "title" "lead" "mark";
    gap: 7px;
    margin-bottom: 22px;
    padding: 18px 16px;
  }
  .catalogue-deep-view.catalogue-splat-view .hero h1 { font-size: clamp(2.8rem, 16vw, 4.2rem); }
  .catalogue-deep-view.catalogue-splat-view .hero-lead { margin-top: 2px; font-size: .94rem; }
  .splat-universe-mark { grid-template-columns: 92px minmax(0, 1fr); padding: 6px 10px; }
  .splat-universe-mark picture { width: 92px; }
}
