:root {
  color-scheme: only light;
  --books-ink: #101827;
  --books-muted: #566176;
  --books-purple: #463477;
  --books-purple-soft: #6755a4;
  --books-gold: #b77b13;
  --books-border: rgba(32, 49, 74, 0.16);
  --books-card: rgba(255, 255, 255, 0.82);
  --books-shadow: 0 18px 45px rgba(54, 38, 79, 0.14);
}

.books-page {
  min-width: 0;
  margin: 0;
  color: var(--books-ink);
  background: linear-gradient(180deg, #f7f8fa 0%, #eef2f5 52%, #f8f7f4 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.books-page *,
.books-page *::before,
.books-page *::after {
  box-sizing: border-box;
}

.books-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.books-shell {
  width: min(100% - 28px, 1120px);
  margin: 0 auto;
}

.books-header {
  padding: 18px 0 8px;
}

.books-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  color: var(--books-ink);
  text-decoration: none;
}

.books-brand img {
  width: 62px;
  height: 42px;
  object-fit: contain;
}

.books-brand span {
  font-size: clamp(1.55rem, 6vw, 2.35rem);
  font-weight: 760;
  letter-spacing: -0.02em;
}

.books-search-panel {
  display: grid;
  gap: 12px;
  padding: 8px 0 14px;
}

.books-search {
  position: relative;
}

.books-search svg {
  position: absolute;
  left: 18px;
  top: 50%;
  width: 23px;
  height: 23px;
  color: var(--books-purple);
  transform: translateY(-50%);
  pointer-events: none;
}

.books-search input,
.books-request-form input,
.books-request-form select,
.books-request-form textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--books-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 26px rgba(54, 38, 79, 0.08);
  color: var(--books-ink);
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.books-search input {
  padding: 0 18px 0 54px;
}

.books-search input:focus,
.books-request-form input:focus,
.books-request-form select:focus,
.books-request-form textarea:focus {
  border-color: rgba(91, 59, 140, 0.56);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(91, 59, 140, 0.12), 0 14px 28px rgba(54, 38, 79, 0.08);
}

.books-category-button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--books-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--books-purple);
  font: inherit;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(54, 38, 79, 0.08);
  cursor: pointer;
}

.books-category-button svg {
  width: 20px;
  height: 20px;
}

.books-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--books-border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--books-shadow);
}

.books-hero-track {
  display: flex;
  touch-action: pan-y;
  transition: transform 0.72s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.books-hero-slide {
  position: relative;
  flex: 0 0 100%;
  min-height: clamp(270px, 62vw, 520px);
  overflow: hidden;
}

.books-hero-slide img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
  object-position: var(--hero-position, center);
}

.books-hero-copy {
  position: absolute;
  inset: 10% 46% auto 8%;
  max-width: 430px;
  color: var(--books-ink);
}

.books-hero-copy span {
  display: inline-block;
  margin-bottom: 9px;
  color: var(--books-purple);
  font-size: 0.82rem;
  font-weight: 800;
}

.books-hero-copy h1 {
  margin: 0;
  max-width: 11ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 8vw, 4.8rem);
  line-height: 0.97;
  letter-spacing: -0.04em;
}

.books-hero-copy p {
  margin: 18px 0 0;
  max-width: 28ch;
  color: #4d4857;
  font-size: clamp(0.9rem, 2.7vw, 1.1rem);
  line-height: 1.5;
}

.books-primary-button,
.books-request-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: 18px;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--books-purple), var(--books-purple-soft));
  color: #fff;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(91, 59, 140, 0.24);
  cursor: pointer;
}

.books-hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.books-hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(21, 21, 45, 0.18);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.books-hero-dot.is-active {
  width: 22px;
  background: var(--books-purple);
}

.books-section {
  padding: 24px 0 0;
}

.books-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.books-section-heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 5vw, 2rem);
  line-height: 1.1;
}

.books-section-heading a {
  color: var(--books-purple);
  font-weight: 800;
  text-decoration: none;
}

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

.books-category-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-height: 86px;
  padding: 8px 16px 8px 8px;
  border: 1px solid var(--books-border);
  border-radius: 18px;
  background: var(--books-card);
  color: var(--books-ink);
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(54, 38, 79, 0.08);
  backdrop-filter: blur(14px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.books-category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(54, 38, 79, 0.12);
}

.books-category-icon {
  width: 78px;
  height: 62px;
  display: block;
  background-image: url("/assets/uns-livres/icons/logos-sous-categories-uns-livres.webp");
  background-position: var(--sprite-position);
  background-size: 500% 200%;
  background-repeat: no-repeat;
  border-radius: 16px;
  justify-self: center;
}

.books-category-icon.has-image {
  width: 82px;
  height: 64px;
  background-image: none;
  border-radius: 0;
}

.books-category-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.books-category-card span:last-child {
  display: block;
  min-width: 0;
  max-width: 100%;
  font-size: clamp(1.02rem, 4.7vw, 1.35rem);
  font-weight: 780;
  line-height: 1.12;
  white-space: normal;
  overflow-wrap: anywhere;
}

.books-featured-grid,
.books-resources-grid {
  display: grid;
  gap: 12px;
}

.books-featured-card {
  min-width: 0;
  max-width: 100%;
}

.books-featured-card img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.books-empty-state {
  padding: 22px;
  border: 1px solid var(--books-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 28px rgba(54, 38, 79, 0.08);
}

.books-empty-state strong {
  display: block;
  font-size: 1.05rem;
}

.books-empty-state p {
  margin: 8px 0 0;
  color: var(--books-muted);
  line-height: 1.55;
}

.books-resource-types {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.books-resource-types span {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid var(--books-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--books-purple);
  font-weight: 800;
  font-size: 0.86rem;
}

.books-request {
  margin: 30px 0;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #f9f4ec, #efe8fb);
  box-shadow: var(--books-shadow);
}

.books-request h2 {
  margin: 0;
  font-size: clamp(1.4rem, 5vw, 2.2rem);
}

.books-request p {
  margin: 8px 0 18px;
  color: var(--books-muted);
  line-height: 1.55;
}

.books-request-form {
  display: grid;
  gap: 11px;
}

.books-request-form label {
  display: grid;
  gap: 6px;
  color: var(--books-ink);
  font-weight: 800;
}

.books-request-form input,
.books-request-form select,
.books-request-form textarea {
  border-radius: 14px;
  padding: 0 14px;
  box-shadow: none;
}

.books-request-form textarea {
  min-height: 110px;
  padding-top: 12px;
  resize: vertical;
}

.books-request-form button {
  width: 100%;
  margin-top: 2px;
}

.books-form-feedback {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(54, 114, 77, 0.12);
  color: #23543a;
  font-weight: 800;
}

.books-footer {
  padding: 24px 0 90px;
  color: #cbd5e1;
  background: #101827;
}

.books-footer-card {
  display: grid;
  grid-template-columns: minmax(190px, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 18px 34px;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.books-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}

.books-footer-brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.books-footer-brand > span { display: grid; gap: 2px; }
.books-footer-brand strong { font-size: .96rem; }
.books-footer-brand small { color: #94a3b8; font-size: .7rem; }

.books-footer-links,
.books-footer-return {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.books-footer-links { justify-content: flex-end; }

.books-footer a {
  color: #f8fafc;
  font-size: .78rem;
  font-weight: 750;
  text-decoration: none;
}

.books-footer-return a {
  color: #f4bf58;
}

.books-footer-bottom {
  grid-column: 1 / -1;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.books-footer-bottom > small { color: #8793a6; font-size: .68rem; }

@media (max-width: 640px) {
  .books-footer { padding: 14px 0 72px; }
  .books-footer-card { grid-template-columns: 1fr; gap: 9px; padding: 0; }
  .books-footer-brand { gap: 8px; }
  .books-footer-brand img { width: 30px; height: 30px; }
  .books-footer-brand small,
  .books-footer-links { display: none; }
  .books-footer-bottom {
    grid-column: auto;
    padding-top: 9px;
    align-items: center;
    flex-direction: row;
    gap: 10px;
  }
  .books-footer-return { margin-left: auto; }
  .books-footer a { font-size: .7rem; }
  .books-footer-bottom > small { font-size: .62rem; }
}

@media (max-width: 430px) {
  .books-shell {
    width: min(100% - 22px, 1120px);
  }

  .books-brand img {
    width: 54px;
    height: 38px;
  }

  .books-hero-copy {
    inset: 8% 34% auto 7%;
  }

  .books-hero-copy p {
    display: none;
  }

  .books-primary-button {
    min-height: 42px;
    padding: 0 14px;
    font-size: 0.86rem;
  }

  .books-category-card {
    grid-template-columns: 76px minmax(0, 1fr);
    min-height: 78px;
    padding-right: 12px;
  }

  .books-category-icon {
    width: 68px;
    height: 54px;
  }

  .books-category-card span:last-child {
    font-size: clamp(0.9rem, 4vw, 1rem);
  }
}

@media (min-width: 560px) {
  .books-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .books-shell {
    width: min(100% - 64px, 1120px);
  }

  .books-header {
    padding-top: 28px;
  }

  .books-search-panel {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .books-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .books-featured-grid,
  .books-resources-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .books-request-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .books-request-form label:nth-child(6),
  .books-request-form button {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1040px) {
  .books-categories {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 2026 red brand refresh and compact catalogue landing. */
:root {
  --books-ink: #07152f;
  --books-muted: #5f6878;
  --books-purple: #d90824;
  --books-purple-soft: #f1253e;
  --books-gold: #c78913;
  --books-border: rgba(7, 21, 47, .12);
  --books-card: #fff;
  --books-shadow: 0 14px 34px rgba(7, 21, 47, .1);
}

.books-page {
  background: linear-gradient(180deg, #fff 0%, #f7f8fb 58%, #fff 100%);
}

.books-header {
  padding: 8px 0;
  border-bottom: 1px solid rgba(7, 21, 47, .08);
  background: rgba(255, 255, 255, .94);
}

.books-header .books-shell {
  display: flex;
  justify-content: center;
}

.books-brand {
  min-height: 46px;
  gap: 10px;
  justify-content: center;
}

.books-brand img {
  width: min(48vw, 190px);
  height: auto;
  aspect-ratio: 3 / 1;
}

.books-brand span {
  padding-left: 10px;
  border-left: 1px solid #d7dce5;
  color: #d90824;
  font-size: clamp(.78rem, 3vw, .95rem);
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.books-hero-shell { margin-top: 0; }

.books-hero {
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(7, 21, 47, .12);
}

.books-hero-slide { min-height: clamp(230px, 52vw, 470px); }
.books-hero-dot.is-active { background: #d90824; }

.books-section { padding-top: 22px; }

.books-section-heading {
  justify-content: center;
  margin-bottom: 12px;
  text-align: center;
}

.books-section-heading h2 {
  color: #07152f;
  font-size: clamp(1.4rem, 5vw, 2rem);
}

.books-categories {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.books-category-card {
  grid-template-columns: 1fr;
  grid-template-rows: 76px auto;
  align-content: center;
  min-height: 132px;
  padding: 12px 8px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 8px 22px rgba(7, 21, 47, .07);
}

.books-category-card:first-child {
  border-color: rgba(217, 8, 36, .35);
  background: linear-gradient(180deg, #fff, #fff4f5);
}

.books-category-icon.has-image {
  width: 94px;
  height: 72px;
}

.books-category-card span:last-child {
  font-size: clamp(.84rem, 3.6vw, 1rem);
  line-height: 1.2;
}

.books-request {
  display: grid;
  gap: 14px;
  margin: 24px auto 30px;
  padding: 18px;
  border: 1px solid rgba(217, 8, 36, .14);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(7, 21, 47, .08);
}

.books-request-copy { min-width: 0; }
.books-request-copy span { color: #6b7280; font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.books-request h2 { margin-top: 3px; font-size: clamp(1.2rem, 4vw, 1.7rem); }

.books-request-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.books-request-form input {
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 8px;
  box-shadow: none;
}

.books-request-form button {
  min-height: 48px;
  width: auto;
  margin: 0;
  padding: 0 16px;
  border-radius: 8px;
  background: #d90824;
  box-shadow: none;
  white-space: nowrap;
}

.books-form-feedback { grid-column: 1 / -1; }

@media (max-width: 520px) {
  .books-shell { width: min(100% - 20px, 1120px); }
  .books-hero-shell { width: 100%; }
  .books-hero { border-inline: 0; border-radius: 0; }
  .books-brand img { width: min(52vw, 174px); }
  .books-hero-copy { inset: 8% 31% auto 6%; }
  .books-hero-copy h1 { font-size: clamp(1.75rem, 8vw, 2.4rem); }
  .books-request-form { grid-template-columns: 1fr; }
  .books-request-form button { width: 100%; }
}

@media (min-width: 768px) {
  .books-categories { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .books-request { grid-template-columns: minmax(190px, .55fr) minmax(0, 1.45fr); align-items: center; }
}
