/* ---------- Bandeau de couvertures ---------- */
/* Titre de la page (thème) et paragraphes d'introduction alignés sur le bord gauche de la zone des livres. */
body:has(.rl-shelf, .rl-livres:not(.rl-livres--single)) :is(.wp-block-post-title, .wp-block-post-content > p){max-width:100rem!important;margin-left:auto!important;margin-right:auto!important}
/* Largeur de la zone des livres : plus large sur les grands écrans. */
.rl-shelf{max-width:100rem;margin-inline:auto;padding-bottom:clamp(2rem,4vw,3rem);border-bottom:1px solid rgba(0,0,0,.1)}
/* Le thème remet les marges entre blocs à zéro : l'écart est porté par le bloc des livres. */
.rl-shelf + .rl-livres{margin-top:clamp(3rem,6vw,4.5rem)!important}
.is-layout-constrained > .rl-shelf.alignwide{max-width:100rem}
.rl-shelf{position:relative}
.rl-shelf-list{list-style:none;margin:0;padding:.25rem 0 0;display:flex;gap:1.75rem;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;-ms-overflow-style:none;overscroll-behavior-x:contain}
.rl-shelf-list::-webkit-scrollbar{display:none}
/* Flèches du carrousel : affichées seulement quand tous les livres ne tiennent pas */
.rl-shelf-nav{display:none;position:absolute;top:calc(.25rem + 7rem);transform:translateY(-50%);z-index:2;width:2.75rem;height:2.75rem;border-radius:50%;border:1px solid rgba(0,0,0,.15);background:#fff;color:#111;box-shadow:0 2px 10px rgba(0,0,0,.12);cursor:pointer;align-items:center;justify-content:center;padding:0;transition:opacity .2s,box-shadow .2s}
.rl-shelf-nav svg{width:1.25rem;height:1.25rem}
.rl-shelf-nav:hover{box-shadow:0 4px 14px rgba(0,0,0,.18)}
.rl-shelf-nav:focus-visible{outline:2px solid #111;outline-offset:2px}
.rl-shelf-nav:disabled{opacity:0;pointer-events:none}
.rl-shelf.is-carousel .rl-shelf-nav{display:flex}
.rl-shelf-prev{left:0}
.rl-shelf-next{right:auto}
.rl-shelf-list li{flex:0 0 auto;width:14rem;scroll-snap-align:start;margin:0}
.rl-shelf-item{display:flex;flex-direction:column;gap:.35rem;color:inherit;text-decoration:none}
.rl-shelf-cover{display:block;transition:transform .2s ease}
.rl-shelf-cover img{display:block;width:100%;height:auto}
.rl-shelf-item:hover .rl-shelf-cover,.rl-shelf-item:focus-visible .rl-shelf-cover{transform:translateY(-4px)}
.rl-shelf-item:focus-visible{outline:2px solid currentColor;outline-offset:4px}
/* Textes alignés sur le dos du livre : dans les visuels 3D (725 px), le livre commence à ~15,5 % de la largeur. */
.rl-shelf-item > :not(.rl-shelf-cover){padding-left:15.5%}
.rl-shelf-title{font-weight:600;line-height:1.25;font-size:.95rem}
.rl-shelf-tome{font-size:.85rem;font-weight:600;line-height:1.25}
.rl-shelf-badge{white-space:nowrap;font-size:.8rem;opacity:.7}

/* ---------- Livres ---------- */
.rl-livres{max-width:100rem;margin-inline:auto}
.is-layout-constrained > .rl-livres.alignwide{max-width:100rem}
.rl-livres *{box-sizing:border-box}
.rl-book{display:grid;grid-template-columns:minmax(0,24rem) minmax(0,1fr);gap:clamp(2rem,5vw,3.5rem);align-items:start;padding-block:3rem;border-top:1px solid rgba(0,0,0,.12);scroll-margin-top:2rem}
.rl-book:first-of-type{border-top:0;padding-top:0}
.rl-side{min-width:0}
.rl-cover{margin:0}
.rl-below{margin-top:1.25rem;display:flex;flex-direction:column;gap:.35rem;font-size:.95rem;text-align:center}
.rl-below p{margin:0}
.rl-status{font-weight:600}
.rl-status--soon{align-self:center;background:#1b2a33;color:#fff;border-radius:999px;padding:.25rem .8rem;font-size:.85rem}
.rl-isbn{opacity:.75;font-variant-numeric:tabular-nums;letter-spacing:.02em}
.rl-livres .rl-file a{display:inline-flex;align-items:center;gap:.4rem;color:inherit;text-decoration:none;font-weight:600;transition:opacity .15s}
.rl-pdf{display:inline-flex;align-items:center;gap:.25rem}
.rl-pdf-icon{width:.95em;height:1.15em;flex:none}
.rl-pdf-label{font-size:.85em;letter-spacing:.02em}
.rl-livres .rl-file a:hover{opacity:.65}
.rl-livres .rl-file a:focus-visible{outline:2px solid currentColor;outline-offset:2px;border-radius:2px}

.rl-cover img{display:block;width:100%;height:auto}
.rl-flags{display:flex;flex-wrap:wrap;gap:.5rem;margin:0 0 .75rem}
.rl-flag{display:inline-block;font-size:.8rem;font-weight:600;padding:.2rem .6rem;border:1px solid currentColor;border-radius:999px}
.rl-flag--soon{background:#1b2a33;border-color:#1b2a33;color:#fff}
.rl-meta{font-size:.9rem;margin:0 0 .5rem}
.rl-genre{opacity:.7}
.rl-collection{display:flex;flex-direction:column;align-items:center;gap:.3rem;margin:0 0 .6rem}
.rl-collection-logo{display:block;max-height:2.5rem;max-width:11rem;width:auto;height:auto}
.rl-collection-name{font-size:.8rem;color:#8a8f94;line-height:1.35}
.rl-title{margin:0;line-height:1.1}
.rl-title a{color:inherit;text-decoration:none}
.rl-title a:hover{text-decoration:underline;text-underline-offset:4px}
.rl-tome{margin:.35rem 0 0;font-size:1rem;font-weight:600;letter-spacing:.01em}
.rl-tome + .rl-subtitle{margin-top:.15rem}
.rl-subtitle{margin:.4rem 0 0;font-size:1.15rem;opacity:.75}
.rl-hook{margin:1.5rem 0;padding-left:1rem;border-left:3px solid currentColor;font-style:italic}
.rl-hook p{margin:0}
.rl-body p{margin:0 0 1rem}

.rl-gallery{list-style:none;margin:1.5rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.6rem}
.rl-gallery li{margin:0}
.rl-gallery a{display:block;border-radius:3px;overflow:hidden}
.rl-gallery img{display:block;width:6.5rem;height:6.5rem;object-fit:cover;transition:opacity .15s}
.rl-gallery a:hover img{opacity:.85}

.rl-facts{display:flex;flex-wrap:wrap;gap:.5rem 2rem;margin:1.75rem 0 0}
.rl-facts dt{font-size:.8rem;opacity:.65;margin:0}
.rl-facts dd{margin:0;font-variant-numeric:tabular-nums}
.rl-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem 1rem;margin-top:1.5rem}
.rl-livres a.rl-cta{text-decoration:none}
/* Boutons à bords arrondis (réserver / commander, Amazon) */
.rl-livres{--rl-radius:999px}
.rl-livres .wp-block-button__link.rl-cta,.rl-livres .rl-btn-outline{border-radius:var(--rl-radius)}
.rl-livres .wp-block-button__link.rl-cta,.rl-livres .rl-btn-outline{font-size:1.15rem;line-height:1.3;padding:.95rem 1.9rem;box-sizing:border-box}
.rl-btn-outline{display:inline-block;padding:.75rem 1.25rem;border:1px solid rgba(0,0,0,.35);border-radius:4px;color:inherit;text-decoration:none;line-height:1.3}
a.rl-btn-outline:hover{border-color:currentColor}
.rl-btn-outline.is-disabled{opacity:.55;cursor:default}
.rl-other-links{font-size:.9rem;margin:1rem 0 0}
.rl-other-links a{color:inherit;text-underline-offset:3px}
.rl-back{margin:2.5rem 0 0;font-size:.95rem}
.rl-back a{color:inherit;text-underline-offset:3px}
.rl-livres--single{margin-top:1rem}

/* ---------- Visionneuse photos ---------- */
.rl-lightbox{border:0;padding:0;background:transparent;max-width:92vw;max-height:92vh}
.rl-lightbox::backdrop{background:rgba(0,0,0,.85)}
.rl-lightbox img{display:block;max-width:92vw;max-height:88vh;width:auto;height:auto}
.rl-lightbox button{position:fixed;top:1rem;right:1rem;width:2.75rem;height:2.75rem;border:0;border-radius:50%;background:#fff;color:#111;font-size:1.5rem;line-height:1;cursor:pointer}

@media (max-width:700px){
  .rl-book{grid-template-columns:1fr}
  .rl-side{max-width:17rem}
  .rl-cover{max-width:17rem}
  .rl-shelf-list li{width:8.5rem}
  .rl-shelf-nav{top:calc(.25rem + 4.25rem);width:2.4rem;height:2.4rem}

  .rl-shelf-badge{white-space:normal}
  .rl-shelf{padding-bottom:1.5rem}
  .rl-shelf + .rl-livres{margin-top:2.5rem!important}
  .rl-livres .wp-block-button__link.rl-cta,.rl-livres .rl-btn-outline{font-size:1.05rem;padding:.9rem 1.4rem}
}
@media (prefers-reduced-motion:reduce){.rl-shelf-cover,.rl-gallery img{transition:none}}
@media (prefers-reduced-motion:no-preference){html:has(.rl-shelf){scroll-behavior:smooth}}
.rl-excerpt{font-size:.95rem;margin:1rem 0 0}
.rl-excerpt a{color:inherit;text-underline-offset:3px;font-weight:600}
.rl-excerpt span{opacity:.6}
.rl-excerpt .rl-sep{opacity:.4}
.rl-shelf-sub{font-size:.85rem;opacity:.75;line-height:1.25}

.rl-livres .rl-btn-outline{padding:.95rem 1.9rem;border-radius:var(--rl-radius)}

/* Choix du classement */
.rl-sort{max-width:100rem;margin:0 auto 1.25rem;display:flex;justify-content:flex-end;align-items:center;gap:.6rem;font-size:.9rem}
/* Sur grand écran, le menu ne prend pas de place dans la page : il est posé sur la ligne du titre dès son placement (pas de saut). */
@media (min-width:701px){.rl-sort:not(.is-placed){position:absolute;visibility:hidden}}
.is-layout-constrained > .rl-sort.alignwide{max-width:100rem}
.rl-sort label{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
.rl-sort.is-floating{margin:0;z-index:2}
.rl-sort select{width:auto;max-width:16rem;font:inherit;color:inherit;background:#fff;border:1px solid rgba(0,0,0,.25);border-radius:999px;padding:.35rem 2rem .35rem .9rem;cursor:pointer}
.rl-book:first-of-type{border-top:0;padding-top:0}

/* Animation du changement de classement : durée et courbe identiques partout. */
::view-transition-group(*){animation-duration:.45s;animation-timing-function:cubic-bezier(.2,.7,.2,1)}
