/* Pages catalogue & fiches livres de formation — rayonnage e-commerce */

.page-livres {
  --livre-ink: #0f3550;
  --livre-paper: #f3f7f9;
  --livre-shelf: #e6eef3;
  --livre-accent: #1a5f85;
  --livre-deal: #c98512;
}

.page-livres .prestations-search-title {
  letter-spacing: -0.02em;
}

.livres-search-form {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.65rem;
  max-width: 44rem;
  margin-inline: auto;
}

.livres-search-form .prestations-search-input-wrapper {
  flex: 1 1 16rem;
  margin: 0;
}

.livres-search-submit,
.prestations-search-submit.livres-search-submit {
  flex: 0 0 auto;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 1.2rem;
  border: none;
  border-radius: 0.75rem;
  background: #0f3550;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.livres-search-submit:hover {
  background: #1a5f85;
}

/* Barre rayons (ancres catégories) */
.livres-shelf-nav {
  margin: 0 0 1.5rem;
}

.livres-shelf-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  list-style: none;
  background: var(--livre-paper);
  border: 1px solid rgba(15, 53, 80, 0.08);
  border-radius: 0.75rem;
}

.livres-shelf-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--livre-ink);
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(15, 53, 80, 0.1);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.livres-shelf-nav a:hover,
.livres-shelf-nav a:focus-visible {
  background: var(--livre-accent);
  border-color: var(--livre-accent);
  color: #fff;
}

.livres-shelf-nav i {
  opacity: 0.85;
  font-size: 0.78em;
}

.page-livres.is-catalog-filtering .livres-shelf-nav {
  display: none;
}

/* Grille boutique : cartes plus larges, responsive
   Specifite >= .page-prestations .services-grid.prestations-grid (sinon bloque a 2 cols) */
.page-livres .services-grid.prestations-grid {
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin-top: 1rem;
}

@media (min-width: 560px) {
  .page-livres .services-grid.prestations-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .page-livres .services-grid.prestations-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .page-livres .services-grid.prestations-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1600px) {
  .page-livres .services-grid.prestations-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.35rem;
  }
}

.page-livres .services-grid.prestations-grid--featured {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .page-livres .services-grid.prestations-grid--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .page-livres .services-grid.prestations-grid--featured {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1400px) {
  .page-livres .services-grid.prestations-grid--featured {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.page-livres .livre-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(15, 53, 80, 0.08);
  border-radius: 0.85rem;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(15, 53, 80, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.page-livres .livre-card:hover {
  transform: translateY(-3px);
  border-color: rgba(26, 95, 133, 0.28);
  box-shadow: 0 12px 28px rgba(15, 53, 80, 0.1);
}

.page-livres .livre-card .service-description {
  flex: 1;
  margin: 0 0.75rem 0.5rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #5a6b78;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-livres .livre-card .service-title {
  font-size: 0.95rem;
  line-height: 1.25;
  margin: 0.45rem 0.75rem 0.2rem;
  color: var(--livre-ink);
}

.page-livres .livre-card--has-cover .prestation-card-visual {
  min-height: 8.5rem;
  aspect-ratio: 3 / 3.4;
}

.page-livres .livre-card .service-price {
  margin: 0 0.9rem 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.5rem;
  background: var(--livre-paper);
}

.page-livres .livre-card .price-amount {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--livre-accent);
}

.page-livres .livre-card .prestation-card-actions {
  margin: 0 0.9rem 0.95rem;
}

.page-livres .livre-card .service-cta {
  width: 100%;
  justify-content: center;
  font-weight: 600;
}

.page-livres .livre-card-level {
  display: inline-block;
  align-self: flex-start;
  margin: 0.65rem 0.9rem 0;
  padding: 0.18rem 0.5rem;
  border-radius: 0.3rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--livre-shelf);
  color: var(--livre-ink);
}

.page-livres .livre-card-pack-meta {
  margin: 0 0.9rem 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #1f7a4d;
}

.page-livres .livre-card .prestation-card-badge {
  top: 0.65rem;
  left: 0.65rem;
  background: var(--livre-deal);
  color: #1a2e1f;
}

.page-livres .prestations-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.55rem;
  border-bottom: 2px solid rgba(26, 95, 133, 0.15);
}

.page-livres .prestations-featured,
.page-livres .prestations-category {
  margin-bottom: 2.25rem;
}

.livre-card .prestation-card-visual[data-livre-cat="informatique"] {
  background: linear-gradient(145deg, #e8f4fc, #d6ebf8);
  color: #1a5f85;
}

.livre-card .prestation-card-visual[data-livre-cat="ia"] {
  background: linear-gradient(145deg, #eef5ff, #e0ebff);
  color: #3b5bdb;
}

.livre-card .prestation-card-visual[data-livre-cat="finance"] {
  background: linear-gradient(145deg, #eef8f1, #d9f0e2);
  color: #1f7a4d;
}

.livre-card .prestation-card-visual[data-livre-cat="commerce"] {
  background: linear-gradient(145deg, #fff6eb, #ffe8cc);
  color: #a85b12;
}

.livre-card .prestation-card-visual[data-livre-cat="marketing"] {
  background: linear-gradient(145deg, #f5eef8, #eadcf3);
  color: #6b3d8a;
}

.livre-card .prestation-card-visual[data-livre-cat="communication"] {
  background: linear-gradient(145deg, #eef7f8, #d9eef1);
  color: #1f6b75;
}

.livre-card--has-cover .prestation-card-visual {
  padding: 0;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  min-height: 11rem;
}

.livre-card-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.livre-card-visual--stack {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #eef6fb, #e4f3ea);
}

.livre-card-cover-stack {
  position: relative;
  width: 72%;
  aspect-ratio: 3 / 4;
}

.livre-card-cover-stack-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.35rem;
  box-shadow: 0 8px 18px rgba(15, 40, 60, 0.22);
  transform:
    translateX(calc(var(--stack-i, 0) * 10px))
    translateY(calc(var(--stack-i, 0) * 6px))
    rotate(calc(var(--stack-i, 0) * 3deg));
  z-index: calc(10 - var(--stack-i, 0));
}

.prestation-detail-visual--cover {
  margin: 0;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(15, 40, 60, 0.18);
}

.livre-detail-cover {
  display: block;
  width: 100%;
  max-width: 22rem;
  height: auto;
  margin-inline: auto;
}

.livres-deal-visual--covers {
  min-height: 14rem;
}

.livres-deal-cover-stack {
  position: relative;
  width: min(11rem, 70%);
  aspect-ratio: 3 / 4;
  margin: 1.2rem auto 0.4rem;
}

.livres-deal-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.45rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  transform:
    translateX(calc(var(--stack-i, 0) * 14px))
    translateY(calc(var(--stack-i, 0) * 8px))
    rotate(calc((var(--stack-i, 0) - 1) * 4deg));
  z-index: calc(8 - var(--stack-i, 0));
  border: 2px solid rgba(255, 255, 255, 0.65);
}

.livre-card .price-compare {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  text-decoration: line-through;
}

.livre-card .prestation-card-visual[data-livre-cat="packs"] {
  background: linear-gradient(145deg, #e8f8ef, #d4f0e0);
  color: #1f7a4d;
}

.prestation-detail-visual-inner[data-livre-cat="packs"] {
  background: linear-gradient(145deg, #e8f8ef, #d4f0e0);
  color: #1f7a4d;
}

.livre-card .price-ht {
  font-size: 0.85em;
}

.prestation-detail-visual-inner[data-livre-cat="informatique"] {
  background: linear-gradient(145deg, #e8f4fc, #d6ebf8);
  color: #1a5f85;
}

.prestation-detail-visual-inner[data-livre-cat="ia"] {
  background: linear-gradient(145deg, #eef5ff, #e0ebff);
  color: #3b5bdb;
}

.prestation-detail-visual-inner[data-livre-cat="finance"] {
  background: linear-gradient(145deg, #eef8f1, #d9f0e2);
  color: #1f7a4d;
}

.prestation-detail-visual-inner[data-livre-cat="commerce"] {
  background: linear-gradient(145deg, #fff6eb, #ffe8cc);
  color: #a85b12;
}

.prestation-detail-visual-inner[data-livre-cat="marketing"] {
  background: linear-gradient(145deg, #f5eef8, #eadcf3);
  color: #6b3d8a;
}

.prestation-detail-visual-inner[data-livre-cat="communication"] {
  background: linear-gradient(145deg, #eef7f8, #d9eef1);
  color: #1f6b75;
}

.livre-keywords {
  margin-top: 1.5rem;
  color: var(--text-muted, #64748b);
  font-size: 0.95rem;
}

.livre-purchase-card .vitrine-price-vat {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted, #64748b);
}

.livre-purchase-card .vitrine-price-compare {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  text-decoration: line-through;
}

/* ---- Pack de la semaine (bandeau e-commerce sous la recherche) ---- */
.livres-deal-week {
  position: relative;
  margin: -0.5rem 0 0;
  padding: 1.25rem 0 1.75rem;
  background:
    linear-gradient(110deg, #0f3550 0%, #1a5f85 42%, #2f9e6a 100%);
  color: #f4fafc;
  overflow: hidden;
}

.livres-deal-week::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 80% at 10% 20%, rgba(255, 255, 255, 0.12), transparent 55%),
    radial-gradient(ellipse 40% 60% at 90% 80%, rgba(255, 210, 120, 0.15), transparent 50%);
  pointer-events: none;
}

.livres-deal-week-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem 2rem;
  align-items: center;
}

@media (max-width: 900px) {
  .livres-deal-week-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.livres-deal-visual {
  position: relative;
  width: 7.5rem;
  height: 7.5rem;
  flex-shrink: 0;
  margin-inline: auto;
}

.livres-deal-visual-glow {
  position: absolute;
  inset: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 220, 140, 0.45), transparent 70%);
}

.livres-deal-icon {
  position: absolute;
  inset: 0.6rem;
  display: grid;
  place-items: center;
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 2.4rem;
  color: #fff;
  backdrop-filter: blur(4px);
}

.livres-deal-ribbon {
  position: absolute;
  left: 50%;
  bottom: -0.35rem;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #f5b942;
  color: #1a2e1f;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.livres-deal-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffe8a3;
}

.livres-deal-kicker i {
  margin-right: 0.3rem;
}

.livres-deal-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.livres-deal-tagline {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.92);
}

.livres-deal-desc {
  margin: 0 0 0.85rem;
  max-width: 36rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 900px) {
  .livres-deal-desc {
    margin-inline: auto;
  }
}

.livres-deal-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 900px) {
  .livres-deal-pills {
    justify-content: center;
  }
}

.livres-deal-pills li {
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
}

.livres-deal-pills .livres-deal-more {
  opacity: 0.85;
  font-style: italic;
}

.livres-deal-buy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  min-width: 12.5rem;
  padding: 1.1rem 1.2rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
}

@media (max-width: 900px) {
  .livres-deal-buy {
    max-width: 18rem;
    margin-inline: auto;
  }
}

.livres-deal-price-block {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.65rem;
}

.livres-deal-compare {
  font-size: 0.95rem;
  text-decoration: line-through;
  opacity: 0.7;
}

.livres-deal-price {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}

.livres-deal-price small {
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.85;
}

.livres-deal-save {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  background: #f5b942;
  color: #1a2e1f;
}

.livres-deal-save em {
  font-style: normal;
  font-weight: 600;
  opacity: 0.85;
}

.livres-deal-meta {
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.85;
}

.livres-deal-cta {
  justify-content: center;
  background: #fff !important;
  color: #0f3550 !important;
  border: none !important;
}

.livres-deal-cta:hover {
  background: #ffe8a3 !important;
  color: #0f3550 !important;
}

.livres-deal-secondary {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.livres-deal-secondary:hover {
  color: #fff;
}

.page-livres.is-catalog-filtering .livres-deal-week {
  display: none;
}

/* Chip actif (Tous les livres) */
.page-livres .prestations-search-chip.is-active {
  background: #0f3550;
  border-color: #0f3550;
  color: #fff;
}

.page-livres .livre-card-level {
  border-radius: 999px;
}

.page-livres .livre-card[data-livre-level="base"] .livre-card-level,
.page-livres .livre-card[data-livre-level="debutant"] .livre-card-level {
  background: #e8f7ee;
  color: #1f7a4d;
}

.page-livres .livre-card[data-livre-level="intermediaire"] .livre-card-level {
  background: #e8f2fb;
  color: #1a5f85;
}

.page-livres .livre-card[data-livre-level="expert"] .livre-card-level {
  background: #f3eef8;
  color: #5b3d7a;
}

.page-livres .livre-card[data-livre-level="pack"] .livre-card-level {
  background: #fff4df;
  color: #8a5a10;
}

.page-livres .livre-card .service-cta {
  background: #0f3550;
  color: #fff;
  border: none;
}

.page-livres .livre-card .service-cta:hover {
  background: #1a5f85;
}

.livres-trust-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  margin: 2rem 0 1.5rem;
  padding: 1rem 1.15rem;
  list-style: none;
  background: #f3f7f9;
  border: 1px solid rgba(15, 53, 80, 0.08);
  border-radius: 0.85rem;
}

.livres-trust-bar li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f3550;
}

.livres-trust-bar i {
  color: #4da9d6;
}

@media (max-width: 720px) {
  .livres-trust-bar {
    grid-template-columns: 1fr 1fr;
  }
}

/* Fiche livre — hero produit */
.livre-detail-root .prestation-detail-hero {
  padding: calc(5rem + 0.75rem) 0 2rem;
  overflow: visible;
}

.livre-detail-root .prestation-detail-hero .container {
  max-width: min(1140px, 100%);
}

.livre-detail-root .prestation-breadcrumb {
  margin: 0 0 1.35rem;
  font-size: 0.86rem;
}

.livre-detail-root .prestation-detail-hero-grid {
  display: grid;
  grid-template-columns: minmax(13rem, 19rem) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.25rem);
  align-items: start;
  overflow: visible;
}

.livre-detail-root .prestation-detail-hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.livre-detail-root .prestation-detail-visual {
  order: -1;
  margin: 0;
  width: 100%;
  max-width: 19rem;
  justify-self: center;
  z-index: 1;
}

.livre-detail-root .prestation-detail-visual--cover {
  background: transparent;
  box-shadow: none;
  overflow: hidden;
  min-height: 0;
}

.livre-detail-root .prestation-detail-visual--livre-stack {
  padding: 0.25rem 0.75rem 0.25rem 0;
}

.livre-detail-root .prestation-detail-visual--cover .livre-detail-cover {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0.85rem;
  box-shadow: 0 16px 40px rgba(15, 40, 60, 0.18);
}

.livre-detail-cover-stack {
  position: relative;
  width: 88%;
  margin-inline: auto;
  aspect-ratio: 3 / 4;
  min-height: 13rem;
}

.livre-detail-cover-stack-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.55rem;
  box-shadow: 0 12px 28px rgba(15, 40, 60, 0.22);
  border: 2px solid rgba(255, 255, 255, 0.75);
  transform:
    translateX(calc(var(--stack-i, 0) * 7px))
    translateY(calc(var(--stack-i, 0) * 5px))
    rotate(calc((var(--stack-i, 0) - 1) * 2.5deg));
  z-index: calc(8 - var(--stack-i, 0));
}

.livre-detail-root .section-badge {
  display: inline-flex;
  margin-bottom: 0.5rem;
}

.livre-detail-root .section-title {
  font-size: clamp(1.85rem, 3.2vw, 2.45rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  overflow: visible;
}

.livre-detail-root .prestation-detail-lead {
  margin-top: 0;
  font-size: 1.08rem;
}

.livre-detail-root .prestation-detail-desc {
  margin-top: 0.65rem;
  max-width: 38rem;
}

.livre-detail-root .prestation-detail-hero-price.livre-hero-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.75rem;
  line-height: 1.2;
  margin: 0 0 0.85rem;
  overflow: visible;
}

.livre-hero-price__amount {
  font-size: clamp(1.75rem, 2.8vw, 2.15rem);
  font-weight: 800;
  color: var(--livre-accent);
  letter-spacing: 0;
  white-space: nowrap;
}

.livre-hero-price__label {
  font-size: 0.92rem;
  font-weight: 600;
  color: #5a6b78;
  white-space: nowrap;
}

.livre-hero-actions {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.15rem;
}

.livre-hero-cta {
  width: 100%;
  max-width: 26rem;
  justify-content: center;
}

.livre-delivery-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #5a6b78;
  background: #f3f7f9;
  border-radius: 0.65rem;
  border: 1px solid rgba(15, 53, 80, 0.08);
  max-width: 26rem;
}

.livre-delivery-hint i {
  color: var(--livre-accent);
  margin-top: 0.15rem;
  flex-shrink: 0;
  pointer-events: none;
}

@media (max-width: 800px) {
  .livre-detail-root .prestation-detail-hero {
    padding-top: calc(4.75rem + 0.5rem);
  }

  .livre-detail-root .prestation-detail-hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .livre-detail-root .prestation-detail-visual {
    order: 0;
    max-width: min(15rem, 78vw);
    margin-inline: auto;
  }

  .livre-detail-cover-stack {
    width: 92%;
  }

  .livre-hero-cta,
  .livre-delivery-hint {
    max-width: none;
  }
}

@media (min-width: 901px) {
  .livre-detail-root .prestation-detail-hero-grid {
    grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
    gap: clamp(2.25rem, 4.5vw, 3.5rem);
  }
}

/* Fiche livre — desktop XL (aligné audit : container 1360px) */
@media (min-width: 1400px) {
  .livre-detail-root .prestation-detail-hero .container,
  .livre-detail-root .prestation-detail-body .container {
    max-width: 1360px;
  }

  .livre-detail-root .prestation-detail-hero {
    padding: calc(5.5rem + 0.85rem) 0 2.75rem;
  }

  .livre-detail-root .prestation-detail-hero-grid {
    grid-template-columns: minmax(16rem, 23rem) minmax(0, 1fr);
    gap: 3.5rem;
  }

  .livre-detail-root .prestation-detail-visual {
    max-width: 23rem;
  }

  .livre-detail-root .section-title {
    font-size: clamp(2rem, 2.15vw, 2.65rem);
  }

  .livre-detail-root .prestation-detail-lead {
    font-size: 1.15rem;
    max-width: 42rem;
  }

  .livre-detail-root .prestation-detail-desc {
    max-width: 44rem;
    font-size: 1.02rem;
    line-height: 1.7;
  }

  .livre-hero-price__amount {
    font-size: 2.2rem;
  }

  .livre-detail-cover-stack {
    min-height: 16.5rem;
    width: 90%;
  }

  .livre-detail-root .prestation-detail-layout {
    gap: 3rem;
    padding: 2.5rem 0 3.75rem;
    grid-template-columns: minmax(0, 1fr) min(400px, 30vw);
  }

  .livre-trust-inline {
    padding: 1rem 1.15rem;
    gap: 0.85rem;
  }

  .livre-trust-inline li {
    font-size: 0.82rem;
  }

  .livre-trust-inline strong {
    font-size: 0.88rem;
  }

  .livre-hero-cta,
  .livre-delivery-hint {
    max-width: 28rem;
  }
}

@media (min-width: 1600px) {
  .livre-detail-root .prestation-detail-hero-grid {
    gap: 4rem;
  }

  .livre-detail-root .prestation-detail-visual {
    max-width: 24rem;
  }
}

.livre-detail-root .section-badge {
  background: #e8f2fb;
  color: #1a5f85;
}

.livre-stripe-feedback,
.livre-stripe-return {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  font-size: 0.92rem;
  line-height: 1.45;
  max-width: 36rem;
  word-break: break-word;
}

.livre-stripe-feedback--ok,
.livre-stripe-return.livre-stripe-feedback--ok {
  color: #1f7a4d;
  background: rgba(31, 122, 77, 0.08);
  border: 1px solid rgba(31, 122, 77, 0.22);
}

.livre-stripe-feedback--error {
  color: #991b1b;
  background: rgba(185, 28, 28, 0.08);
  border: 1px solid rgba(185, 28, 28, 0.2);
}

.livre-refund-hint {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: #5a6b78;
}

.livre-refund-hint i {
  color: #1f7a4d;
  margin-right: 0.35rem;
}

.livre-trust-inline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1rem 0 0;
  padding: 0.85rem;
  list-style: none;
  background: #f3f7f9;
  border-radius: 0.75rem;
  border: 1px solid rgba(15, 53, 80, 0.08);
}

.livre-trust-inline li {
  display: grid;
  gap: 0.15rem;
  font-size: 0.78rem;
  color: #5a6b78;
}

.livre-trust-inline i {
  color: #4da9d6;
  margin-bottom: 0.15rem;
}

.livre-trust-inline strong {
  color: #0f3550;
  font-size: 0.82rem;
}

@media (max-width: 720px) {
  .livre-trust-inline {
    grid-template-columns: 1fr;
  }
}

/* Hero : ne pas heriter du container 1760px (shop-ux) */
.page-livres .livres-search-hero .prestations-search-inner {
  max-width: 48rem;
}

.page-livres .livres-search-form {
  max-width: 44rem;
  width: 100%;
}

/* Desktop XL */
@media (min-width: 1400px) {
  .page-livres .livres-search-hero {
    padding-top: clamp(5.4rem, 7.2vw, 6.35rem);
    padding-bottom: clamp(1.5rem, 2.5vw, 2.15rem);
  }

  .page-livres .livres-search-hero .prestations-search-inner {
    max-width: 52rem;
  }

  .page-livres .livres-search-form {
    max-width: 48rem;
  }

  .page-livres .prestations-search-title {
    font-size: clamp(1.85rem, 2.2vw, 2.35rem);
  }

  .livres-deal-week {
    padding: 1.5rem 0 2rem;
  }

  .livres-deal-week-inner {
    grid-template-columns: minmax(8rem, 11rem) minmax(0, 40rem) minmax(13rem, 17rem);
    justify-content: center;
    column-gap: 2.5rem;
  }

  .livres-deal-desc {
    max-width: none;
  }
}

/* Mobile & tablette */
@media (max-width: 640px) {
  .page-livres .livres-search-form {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .page-livres .livres-search-form .prestations-search-input-wrapper {
    flex: 1 1 auto;
    width: 100%;
  }

  .page-livres .livres-search-submit {
    width: 100%;
    justify-content: center;
    min-height: 2.85rem;
  }

  .page-livres .livres-search-hero .prestations-search-inner {
    max-width: 100%;
  }

  .page-livres .prestations-search-lead {
    font-size: 0.88rem;
  }

  .livres-deal-week {
    padding: 1rem 0 1.35rem;
  }

  .livres-deal-title {
    font-size: 1.35rem;
  }

  .livres-deal-buy {
    max-width: none;
    width: 100%;
  }

  .page-livres .livre-card .service-title {
    font-size: 0.92rem;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  .page-livres .livres-search-hero .prestations-search-inner {
    max-width: 42rem;
  }
}

@media (min-width: 641px) and (max-width: 899px) {
  .page-livres .services-grid.prestations-grid--featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
