/* Médiathèque publique AnimyJob — structure premium isolée. */
body.ajp-controller-ressources .ajr-page {
  --ajr-ink: #083f58;
  --ajr-muted: #526b78;
  --ajr-line: #d7e3e8;
  --ajr-soft: #f7fafb;
  --ajr-primary: #1976a3;
  --ajr-primary-dark: #0d5877;
  --ajr-accent: #f47c1c;
  --ajr-success: #1976a3;
  width: min(1180px, calc(100% - 48px));
  max-width: 1180px;
  padding: 28px 0 90px;
  color: var(--ajr-ink);
  font-family: "Manrope", "Nunito", ui-sans-serif, system-ui, sans-serif;
}

body.ajp-controller-ressources .ajr-page .ajr-breadcrumb {
  margin-bottom: 24px;
  color: #8a91a1;
  font-size: 12px;
}

body.ajp-controller-ressources .ajr-page .ajr-breadcrumb a {
  color: var(--ajr-primary);
}

body.ajp-controller-ressources .ajr-page .ajr-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #5f6676;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

body.ajp-controller-ressources .ajr-page .ajr-eyebrow::before {
  content: "";
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: var(--ajr-accent);
}

/* Catalogue */
body.ajp-controller-ressources .ajr-page .ajr-hero {
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
  gap: 62px;
  min-height: 560px;
  padding: 66px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 17%, rgba(244, 124, 28, .14), transparent 26%),
    linear-gradient(180deg, #fff 0%, #eef7fa 100%);
  color: var(--ajr-ink);
  box-shadow: none;
}

body.ajp-controller-ressources .ajr-page .ajr-hero::before {
  display: none;
}

body.ajp-controller-ressources .ajr-page .ajr-hero__content {
  max-width: 680px;
}

body.ajp-controller-ressources .ajr-page .ajr-hero .ajr-eyebrow {
  color: #5f6676;
}

body.ajp-controller-ressources .ajr-page .ajr-hero h1 {
  max-width: 760px;
  margin: 16px 0 20px;
  color: var(--ajr-ink);
  font-size: clamp(52px, 5.2vw, 72px);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.052em;
}

body.ajp-controller-ressources .ajr-page .ajr-hero p {
  color: #5e6778;
  font-size: 17px;
  line-height: 1.72;
}

body.ajp-controller-ressources .ajr-page .ajr-hero__stats {
  gap: 8px;
  margin-top: 24px;
  color: #475467;
}

body.ajp-controller-ressources .ajr-page .ajr-hero__stats strong {
  color: var(--ajr-primary);
}

body.ajp-controller-ressources .ajr-page .ajr-hero__dot {
  background: var(--ajr-accent);
}

body.ajp-controller-ressources .ajr-page .ajr-hero__visual {
  min-height: 430px;
}

body.ajp-controller-ressources .ajr-page .ajr-hero__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 90px 26px 26px 26px;
  background: linear-gradient(145deg, var(--ajr-primary), var(--ajr-primary-dark));
  box-shadow: 0 24px 70px rgba(24, 34, 70, .12);
}

body.ajp-controller-ressources .ajr-page .ajr-hero__shape {
  position: absolute;
  display: block;
}

body.ajp-controller-ressources .ajr-page .ajr-hero__shape--blue {
  top: -58px;
  right: -48px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}

body.ajp-controller-ressources .ajr-page .ajr-hero__shape--orange {
  bottom: -198px;
  left: 42px;
  width: 315px;
  height: 315px;
  border-radius: 76px;
  background: var(--ajr-accent);
  transform: rotate(-11deg);
}

body.ajp-controller-ressources .ajr-page .ajr-hero__documents {
  position: absolute;
  z-index: 2;
  inset: 18px;
}

body.ajp-controller-ressources .ajr-page .ajr-sheet {
  width: 172px;
  height: 220px;
  padding: 20px;
  border: 5px solid rgba(255, 255, 255, .82);
  border-radius: 15px;
  font-size: 17px;
  box-shadow: 0 22px 52px rgba(13, 30, 94, .28);
}

body.ajp-controller-ressources .ajr-page .ajr-sheet--one {
  top: 30px;
  left: 18px;
  background: var(--ajr-accent);
}

body.ajp-controller-ressources .ajr-page .ajr-sheet--two {
  top: 10px;
  left: 92px;
  background: var(--ajr-primary);
}

body.ajp-controller-ressources .ajr-page .ajr-sheet--three {
  top: 44px;
  left: 64px;
  background: var(--ajr-primary-dark);
}

body.ajp-controller-ressources .ajr-page .ajr-hero__note {
  position: absolute;
  z-index: 4;
  right: 18px;
  bottom: 20px;
  width: 225px;
  padding: 17px;
  border: 1px solid var(--ajr-line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(13, 30, 94, .22);
  color: var(--ajr-ink);
}

body.ajp-controller-ressources .ajr-page .ajr-hero__note span {
  display: block;
  margin-bottom: 6px;
  color: var(--ajr-accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

body.ajp-controller-ressources .ajr-page .ajr-hero__note strong {
  display: block;
  font-size: 15px;
  line-height: 1.3;
}

/* Sections, recherche et cartes */
body.ajp-controller-ressources .ajr-page .ajr-section {
  margin-top: 0;
  padding: 82px 0;
  border-top: 1px solid var(--ajr-line);
}

body.ajp-controller-ressources .ajr-page .ajr-section__heading {
  gap: 42px;
  margin-bottom: 30px;
}

body.ajp-controller-ressources .ajr-page :where(.ajr-section__heading, .ajr-search, .ajr-editorial, .ajr-faq) h2 {
  color: var(--ajr-ink);
  font-size: clamp(34px, 3.7vw, 44px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.043em;
}

body.ajp-controller-ressources .ajr-page .ajr-categories {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

body.ajp-controller-ressources .ajr-page .ajr-category {
  min-height: 102px;
  padding: 18px;
  border-color: var(--ajr-line);
  border-radius: 18px;
  box-shadow: none;
}

body.ajp-controller-ressources .ajr-page .ajr-category__icon {
  border-radius: 13px;
  background: var(--ajr-primary);
}

body.ajp-controller-ressources .ajr-page .ajr-category:nth-child(3n + 2) .ajr-category__icon {
  background: var(--ajr-accent);
}

body.ajp-controller-ressources .ajr-page .ajr-category:nth-child(3n) .ajr-category__icon {
  background: var(--ajr-ink);
}

body.ajp-controller-ressources .ajr-page .ajr-category__arrow,
body.ajp-controller-ressources .ajr-page .ajr-card__category,
body.ajp-controller-ressources .ajr-page .ajr-card__link {
  color: var(--ajr-primary) !important;
}

body.ajp-controller-ressources .ajr-page .ajr-search {
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.48fr);
  gap: 38px;
  margin: 0 0 82px;
  padding: 32px;
  border-color: var(--ajr-line);
  border-radius: 22px;
  background: var(--ajr-soft);
}

body.ajp-controller-ressources .ajr-page .ajr-search__form :where(input, select) {
  border-color: #dfe3ec;
  border-radius: 13px;
}

body.ajp-controller-ressources .ajr-page .ajr-search__form button {
  border-radius: 13px;
  background: var(--ajr-primary);
}

body.ajp-controller-ressources .ajr-page .ajr-grid {
  gap: 18px;
}

body.ajp-controller-ressources .ajr-page .ajr-card {
  border-color: var(--ajr-line);
  border-radius: 19px;
  box-shadow: none;
}

body.ajp-controller-ressources .ajr-page .ajr-card:hover {
  border-color: rgba(25, 118, 163, .42);
  box-shadow: 0 16px 42px rgba(24, 34, 70, .09);
  transform: translateY(-2px);
}

body.ajp-controller-ressources .ajr-page .ajr-card__placeholder {
  background: linear-gradient(145deg, var(--ajr-primary), var(--ajr-primary-dark));
}

body.ajp-controller-ressources .ajr-page .ajr-pagination :where(a, .current, .is-current) {
  min-width: 42px;
  min-height: 42px;
  border-radius: 12px;
}

body.ajp-controller-ressources .ajr-page .ajr-pagination :where(.current, .is-current) {
  border-color: var(--ajr-primary);
  background: var(--ajr-primary);
}

body.ajp-controller-ressources .ajr-page .ajr-editorial {
  margin-top: 0;
  padding: 54px;
  border-radius: 24px;
  background: var(--ajr-ink);
}

body.ajp-controller-ressources .ajr-page .ajr-editorial h2 {
  color: #fff;
}

body.ajp-controller-ressources .ajr-page .ajr-editorial .ajr-eyebrow {
  color: #ffb47d;
}

body.ajp-controller-ressources .ajr-page .ajr-steps li > span {
  background: var(--ajr-primary);
}

/* Familles et thèmes */
body.ajp-controller-ressources .ajr-page .ajr-category-hero {
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr);
  gap: 58px;
  min-height: 490px;
  padding: 58px;
  overflow: hidden;
  border: 0;
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 17%, rgba(25, 118, 163, .13), transparent 26%),
    linear-gradient(180deg, #fff 0%, #eef7fa 100%);
}

body.ajp-controller-ressources .ajr-page .ajr-category-hero__content {
  min-width: 0;
}

body.ajp-controller-ressources .ajr-page .ajr-category-hero h1 {
  margin: 16px 0 18px;
  color: var(--ajr-ink);
  font-size: clamp(48px, 5vw, 68px);
  font-weight: 800;
  line-height: .99;
  letter-spacing: -.052em;
}

body.ajp-controller-ressources .ajr-page .ajr-category-hero__meta strong {
  color: var(--ajr-primary);
}

body.ajp-controller-ressources .ajr-page .ajr-category-hero__visual {
  position: relative;
  min-height: 360px;
}

body.ajp-controller-ressources .ajr-page .ajr-category-hero__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 82px 24px 24px 24px;
  background: linear-gradient(145deg, var(--ajr-primary), var(--ajr-primary-dark));
  box-shadow: 0 24px 70px rgba(24, 34, 70, .12);
}

body.ajp-controller-ressources .ajr-page .ajr-category-hero__shape {
  position: absolute;
  right: -50px;
  bottom: -185px;
  width: 300px;
  height: 300px;
  border-radius: 72px;
  background: var(--ajr-accent);
  transform: rotate(-11deg);
}

body.ajp-controller-ressources .ajr-page .ajr-category-hero__mark {
  position: absolute;
  z-index: 2;
  top: 40px;
  left: 34px;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  font-size: 46px;
  font-weight: 800;
}

body.ajp-controller-ressources .ajr-page .ajr-category-hero__stage > img {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 18px;
  width: 70%;
  height: 58%;
  border: 4px solid rgba(255, 255, 255, .75);
  border-radius: 20px;
  object-fit: cover;
}

body.ajp-controller-ressources .ajr-page .ajr-category-hero__stage > small {
  position: absolute;
  z-index: 3;
  bottom: 28px;
  left: 30px;
  max-width: 220px;
  color: #fff;
  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
}

body.ajp-controller-ressources .ajr-page .ajr-layout {
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 38px;
  margin-top: 72px;
}

body.ajp-controller-ressources .ajr-page .ajr-sidebar {
  top: 110px;
  border-color: var(--ajr-line);
  border-radius: 18px;
}

body.ajp-controller-ressources .ajr-page .ajr-sidebar a.is-active {
  color: var(--ajr-primary);
  background: #eef7fa;
}

/* Fiches */
body.ajp-controller-ressources .ajr-page .ajr-resource__header {
  max-width: none;
  min-height: 420px;
  margin: 0 0 46px;
  padding: 58px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 17%, rgba(25, 118, 163, .13), transparent 26%),
    linear-gradient(180deg, #fff 0%, #eef7fa 100%);
}

body.ajp-controller-ressources .ajr-page .ajr-resource__header-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .35fr);
  gap: 62px;
  align-items: end;
}

body.ajp-controller-ressources .ajr-page .ajr-resource__header h1 {
  max-width: 820px;
  margin: 16px 0 18px;
  color: var(--ajr-ink);
  font-size: clamp(50px, 5vw, 68px);
  font-weight: 800;
  line-height: .99;
  letter-spacing: -.052em;
}

body.ajp-controller-ressources .ajr-page .ajr-resource__answer {
  max-width: 740px;
  color: #5e6778;
  font-size: 17px;
  line-height: 1.72;
}

body.ajp-controller-ressources .ajr-page .ajr-resource__hero-facts {
  display: grid;
  align-content: end;
  min-height: 225px;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--ajr-primary), var(--ajr-primary-dark));
  color: #fff;
  box-shadow: 0 24px 70px rgba(24, 34, 70, .12);
}

body.ajp-controller-ressources .ajr-page .ajr-resource__hero-facts > span {
  margin-bottom: 8px;
  color: #dbe2ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

body.ajp-controller-ressources .ajr-page .ajr-resource__hero-facts strong {
  margin-bottom: 12px;
  font-size: 25px;
  line-height: 1.1;
}

body.ajp-controller-ressources .ajr-page .ajr-resource__hero-facts small {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 12px;
}

body.ajp-controller-ressources .ajr-page .ajr-resource__top {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 28px;
}

body.ajp-controller-ressources .ajr-page .ajr-preview {
  border-color: var(--ajr-line);
  border-radius: 25px;
  background: var(--ajr-soft);
  box-shadow: 0 24px 70px rgba(24, 34, 70, .08);
}

body.ajp-controller-ressources .ajr-page .ajr-preview__placeholder {
  background: linear-gradient(145deg, var(--ajr-primary), var(--ajr-primary-dark));
}

body.ajp-controller-ressources .ajr-page .ajr-download-card {
  top: 110px;
  border-color: var(--ajr-line);
  border-radius: 23px;
  background: #fff;
  box-shadow: none;
}

body.ajp-controller-ressources .ajr-page .ajr-download-button {
  border-radius: 13px;
  background: var(--ajr-accent);
  box-shadow: none;
}

body.ajp-controller-ressources .ajr-page :where(.ajr-content-panel, .ajr-info-box, .ajr-gallery figure, .ajr-faq details) {
  border-color: var(--ajr-line);
  border-radius: 18px;
  box-shadow: none;
}

body.ajp-controller-ressources .ajr-page .ajr-resource__footer {
  border-color: var(--ajr-line);
  background: var(--ajr-soft);
}

@media (max-width: 980px) {
  body.ajp-controller-ressources .ajr-page .ajr-hero,
  body.ajp-controller-ressources .ajr-page .ajr-category-hero,
  body.ajp-controller-ressources .ajr-page .ajr-resource__header-grid,
  body.ajp-controller-ressources .ajr-page .ajr-resource__top,
  body.ajp-controller-ressources .ajr-page .ajr-layout,
  body.ajp-controller-ressources .ajr-page .ajr-search {
    grid-template-columns: 1fr;
  }

  body.ajp-controller-ressources .ajr-page .ajr-hero__visual {
    display: block;
  }

  body.ajp-controller-ressources .ajr-page .ajr-resource__hero-facts {
    min-height: 0;
  }

  body.ajp-controller-ressources .ajr-page .ajr-sidebar,
  body.ajp-controller-ressources .ajr-page .ajr-download-card {
    position: static;
  }
}

@media (max-width: 720px) {
  body.ajp-controller-ressources .ajr-page {
    width: min(100% - 28px, 1180px);
  }

  body.ajp-controller-ressources .ajr-page .ajr-hero,
  body.ajp-controller-ressources .ajr-page .ajr-category-hero,
  body.ajp-controller-ressources .ajr-page .ajr-resource__header {
    min-height: 0;
    padding: 38px 22px;
    border-radius: 22px;
  }

  body.ajp-controller-ressources .ajr-page .ajr-hero h1,
  body.ajp-controller-ressources .ajr-page .ajr-category-hero h1,
  body.ajp-controller-ressources .ajr-page .ajr-resource__header h1 {
    font-size: 43px;
  }

  body.ajp-controller-ressources .ajr-page .ajr-hero__visual,
  body.ajp-controller-ressources .ajr-page .ajr-category-hero__visual {
    min-height: 330px;
  }

  body.ajp-controller-ressources .ajr-page .ajr-section__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  body.ajp-controller-ressources .ajr-page .ajr-categories,
  body.ajp-controller-ressources .ajr-page .ajr-grid,
  body.ajp-controller-ressources .ajr-page .ajr-grid--two {
    grid-template-columns: 1fr;
  }

  body.ajp-controller-ressources .ajr-page .ajr-search__form {
    grid-template-columns: 1fr;
  }

  body.ajp-controller-ressources .ajr-page .ajr-search__form button {
    grid-column: auto;
  }

  body.ajp-controller-ressources .ajr-page .ajr-editorial {
    grid-template-columns: 1fr;
    padding: 34px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.ajp-controller-ressources .ajr-page *,
  body.ajp-controller-ressources .ajr-page *::before,
  body.ajp-controller-ressources .ajr-page *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

/* Actions médiathèque 2026 : primaire bleue, secondaire outline, accent orange réservé. */
body.ajp-controller-ressources .ajr-page :where(button,.btn,.ajr-button,.ajr-download-button) {
  border:1px solid var(--ajr-primary);
  border-radius:12px;
  background:var(--ajr-primary);
  color:#fff;
  box-shadow:none;
  font-weight:800;
  transition:background-color .18s ease,border-color .18s ease,color .18s ease,transform .18s ease;
}
body.ajp-controller-ressources .ajr-page :where(button,.btn,.ajr-button,.ajr-download-button):hover {
  border-color:var(--ajr-primary-dark);
  background:var(--ajr-primary-dark);
  color:#fff;
  box-shadow:none;
  transform:translateY(-1px);
}
body.ajp-controller-ressources .ajr-page :where(.btn-outline,.ajr-button--outline,.ajr-button--secondary) {
  border:1px solid var(--ajr-primary);
  background:#fff;
  color:var(--ajr-primary-dark);
  box-shadow:none;
}
body.ajp-controller-ressources .ajr-page :where(.btn-outline,.ajr-button--outline,.ajr-button--secondary):hover {
  background:#eef7fa;
  color:var(--ajr-primary-dark);
}
body.ajp-controller-ressources .ajr-page :where(.ajr-eyebrow,[class*="eyebrow"]) { color:var(--ajr-accent); }

/* Hero catalogue compact : priorité au contenu et aux filtres. */
body.ajp-controller-ressources .ajr-page .ajr-hero { min-height: 0; padding: clamp(34px,5vw,56px); }
body.ajp-controller-ressources .ajr-page .ajr-hero h1 { font-size: clamp(42px,4.6vw,62px); }
body.ajp-controller-ressources .ajr-page .ajr-hero__visual { min-height: 330px; }
@media (max-width:980px) {
  body.ajp-controller-ressources .ajr-page .ajr-hero__visual { min-height: 260px; }
}
@media (max-width:720px) {
  body.ajp-controller-ressources .ajr-page .ajr-hero h1 { font-size: clamp(36px,10vw,46px); }
  body.ajp-controller-ressources .ajr-page .ajr-hero__visual { min-height: 220px; }
}
