/* ---------- Boutique : livres flottants, aucune boîte ---------- */
.shop { position: relative; padding: clamp(70px, 10vw, 120px) 16px 40px; overflow: hidden; }
.shop-head { text-align: center; max-width: 720px; margin: 0 auto clamp(30px, 6vw, 70px); }
.shop-list { display: grid; gap: clamp(50px, 9vw, 110px); width: min(1080px, 100%); margin: 0 auto; }
.sp { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: clamp(24px, 5vw, 70px); }
.sp.flip .sp-visual { order: 2; }
.sp-visual { position: relative; display: grid; place-items: center; min-height: clamp(260px, 34vw, 400px); perspective: 1200px; }
.sp-glow { position: absolute; inset: 6% 10%; border-radius: 50%; background: radial-gradient(closest-side, var(--t), transparent); filter: blur(10px); animation: spGlow 6s ease-in-out infinite; }
@keyframes spGlow { 50% { transform: scale(1.08) rotate(8deg); border-radius: 44% 56% 52% 48%; } }
.sp-cover { position: relative; width: clamp(190px, 26vw, 300px); aspect-ratio: 1; border-radius: 6px 14px 14px 6px; background: #fff right center / 200% 100% no-repeat;
  box-shadow: -10px 0 0 rgba(0,0,0,.07) inset, 0 40px 60px -26px rgba(42,27,46,.55); transform: rotateY(-24deg) rotateX(6deg) translateY(40px) scale(.85); opacity: 0;
  transition: transform 1s cubic-bezier(.2,1.2,.35,1), opacity .6s; }
.sp.flip .sp-cover { transform: rotateY(24deg) rotateX(6deg) translateY(40px) scale(.85); }
.sp.in .sp-cover { opacity: 1; transform: rotateY(-14deg) rotateX(4deg); animation: spFloat 5s 1s ease-in-out infinite; }
.sp.flip.in .sp-cover { transform: rotateY(14deg) rotateX(4deg); }
@keyframes spFloat { 50% { translate: 0 -12px; } }
.sp-visual:hover .sp-cover { transform: rotateY(0) rotateX(0) scale(1.04); }
.sp-ribbon { position: absolute; top: 8%; right: 6%; padding: 8px 14px; border-radius: 12px; background: #FFF0A4; color: #CA5289; font: 700 clamp(15px, 1.6vw, 19px) "Fredoka", sans-serif; box-shadow: 5px 6px 0 #F6DCE8; rotate: 6deg; animation: spRib 2.6s ease-in-out infinite; }
@keyframes spRib { 50% { rotate: 2deg; scale: 1.06; } }
.sp-info { opacity: 0; transform: translateX(40px); transition: .8s .15s cubic-bezier(.2,1,.3,1); }
.sp.flip .sp-info { transform: translateX(-40px); }
.sp.in .sp-info { opacity: 1; transform: none; }
.sp-level { display: inline-block; padding: 6px 12px; border-radius: 11px; background: color-mix(in srgb, var(--c) 16%, #fff); color: color-mix(in srgb, var(--c) 85%, #000); font: 700 14px "Fredoka", sans-serif; rotate: -2deg; box-shadow: 4px 5px 0 color-mix(in srgb, var(--c) 22%, #fff); }
.sp h3 { margin: 12px 0 6px; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.05; color: var(--ink); }
.sp-rank { margin: 0 0 12px; font: 700 15px var(--text); color: #B9771A; }
.sp.best .sp-rank { font-size: 17px; color: #C2501A; }
.sp-text { margin: 0 0 12px; color: var(--muted); font-size: 16px; line-height: 1.55; }
.sp-feat { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; }
.sp-feat li { position: relative; padding-left: 28px; font: 600 15px var(--text); color: var(--ink); }
.sp-feat li::before { content: "✓"; position: absolute; left: 0; top: -1px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--c); color: #fff; font-size: 12px; }
.sp-buy { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sp-add { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.15; }
.sp-add small { font: 600 11.5px var(--text); opacity: .85; }
.sp-add .sp-cart-ico { position: absolute; }
.sp-add { position: relative; padding-left: 44px !important; }
.sp-add .sp-cart-ico { left: 16px; top: 50%; translate: 0 -50%; font-size: 18px; }
.sp-review { display: block; margin-top: 14px; font: 600 14px var(--text); color: var(--muted); text-decoration: none; }
.sp-review u { color: #C2501A; text-decoration-color: #FFD45C; text-decoration-thickness: 3px; }
.sp-more { display: inline-block; margin-top: 10px; font: 700 15px var(--text); color: var(--c); text-decoration: none; }
.sp-more:hover { translate: 4px 0; }
@media (max-width: 760px) {
  .sp, .sp.flip { grid-template-columns: 1fr; gap: 6px; text-align: left; }
  .sp.flip .sp-visual { order: 0; }
  .sp-visual { min-height: 240px; }
  .sp-cover { width: min(210px, 58vw); }
  .sp-info, .sp.flip .sp-info { transform: translateY(30px); }
  .sp-buy .btn { width: 100%; justify-content: center; }
  .sp-add { align-items: center; }
}

/* ---------- Les fiches gratuites, sous les livres ---------- */
.shop-free { width: min(1000px, 100%); margin: clamp(80px, 12vw, 140px) auto 0; text-align: center; }
.sf-title { margin: 0 0 8px; font-size: clamp(28px, 4vw, 40px); color: var(--ink); }
.sf-title em { font-style: normal; color: #2E7D5B; }
.sf-lead { margin: 0 0 30px; font: 600 18px var(--text); color: var(--muted); }
.sf-lead b { color: #2E7D5B; }
.sf-list { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(26px, 4vw, 48px); }
.sf-item { width: clamp(150px, 17vw, 190px); display: grid; justify-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.sf-sheet { display: grid; place-items: center; width: 100%; aspect-ratio: .72; overflow: hidden; border-radius: 4px; background: #fff; box-shadow: 0 22px 34px -16px rgba(42,27,46,.45); rotate: var(--r); transition: rotate .4s, translate .4s cubic-bezier(.3,1.5,.5,1); }
.sf-sheet img { width: 100%; height: 100%; object-fit: cover; }
.sf-ico { font-size: 54px; }
.sf-item:hover .sf-sheet { rotate: 0deg; translate: 0 -8px; }
.sf-txt b { display: block; font: 700 17px/1.2 "Fredoka", sans-serif; }
.sf-txt small { display: block; margin-top: 4px; font: 600 13px var(--text); color: #2E7D5B; }
.shop-free.sf-in .sf-item { animation: sfIn .7s calc(var(--n) * .08s) cubic-bezier(.3,1.4,.5,1) both; }
@keyframes sfIn { from { opacity: 0; transform: translateY(40px) rotate(8deg) scale(.9); } }
@media (max-width: 760px) {
  .sf-list { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 16px 24px; margin: 0 -16px; scrollbar-width: none; }
  .sf-item { flex: none; width: 62vw; scroll-snap-align: center; }
}
html[data-theme="nuit"] .st-tab.on { color: #FFE08A; } html[data-theme="nuit"] .shop-tabs.free .st-tab.on { color: #B6F0D2; }
html[data-theme="nuit"] .st-blob { background: #2B2614; box-shadow: 3px 4px 0 #000; } html[data-theme="nuit"] .shop-tabs.free .st-blob { background: #16322A; }
html[data-theme="nuit"] .sf-txt small, html[data-theme="nuit"] .sf-lead b, html[data-theme="nuit"] .sf-title em { color: #9FE3C2; }
.sp-help { display: block; margin-top: 12px; font: 600 14px var(--text); color: var(--muted); text-decoration: none; }
.sp-help u { color: var(--raspberry, #D23A7E); text-decoration-color: #FFD45C; text-decoration-thickness: 3px; }
/* Arrivée par un lien précis : l'élément visé saute et s'entoure d'un halo */
.here .sp-cover, .sf-item.here .sf-sheet { animation: hereJump 1.2s .5s cubic-bezier(.3,1.6,.5,1) 2; }
.sf-item.here .sf-txt b, .sp.here h3 { background: linear-gradient(transparent 60%, #FFE14D 60%); }
@keyframes hereJump { 30% { scale: 1.12; rotate: -4deg; } 60% { scale: .97; rotate: 2deg; } }
.sp, .sf-item { scroll-margin-top: 70px; }
/* Téléphone : étagère de fiches qui défile, pilotable au pouce */
@media (max-width: 760px) {
  .shop-free .sf-list { scroll-snap-type: none; gap: 18px; padding: 10px 16px 18px; overscroll-behavior-x: contain; }
  .shop-free .sf-item { width: 44vw; max-width: 200px; }
  .shop-free .sf-txt b { font-size: 15px; }
  .shop-free .sf-txt small { font-size: 12px; }
  .sf-nav { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 10px; }
  .sf-nav button { position: relative; display: grid; place-items: center; width: 54px; height: 54px; border: 0; border-radius: 18px; cursor: pointer; touch-action: manipulation;
    background: linear-gradient(160deg, #FFFFFF, #E4F6EC 60%, #C9EBD8); color: #23704C;
    box-shadow: inset 0 2px 0 rgba(255,255,255,.95), inset 0 -3px 0 rgba(35,112,76,.12), 0 5px 0 #A9DCC0, 0 12px 18px -8px rgba(35,112,76,.45);
    transition: transform .18s cubic-bezier(.3,1.6,.5,1), box-shadow .18s; }
  .sf-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
  .sf-nav .sf-play { width: 68px; height: 68px; border-radius: 50%; color: #fff;
    background: radial-gradient(circle at 35% 28%, #7FE0B0, #3EC48A 45%, #23845A);
    box-shadow: inset 0 3px 0 rgba(255,255,255,.45), inset 0 -4px 0 rgba(0,0,0,.12), 0 6px 0 #1C6B48, 0 14px 22px -8px rgba(35,112,76,.6); }
  .sf-nav .sf-play svg { width: 26px; height: 26px; fill: currentColor; stroke: none; }
  .sf-nav .sf-play.paused svg { translate: 2px 0; }
  .sf-nav .sf-play::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid rgba(62,196,138,.35); animation: sfRing 2.2s ease-out infinite; }
  .sf-nav .sf-play.paused::after { animation: none; opacity: 0; }
  @keyframes sfRing { from { transform: scale(.9); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
  .sf-nav button:active { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255,255,255,.9), 0 1px 0 #A9DCC0, 0 4px 8px -4px rgba(35,112,76,.4); }
  .sf-nav .sf-play:active { box-shadow: inset 0 3px 0 rgba(255,255,255,.4), 0 2px 0 #1C6B48, 0 6px 10px -6px rgba(35,112,76,.5); }
  html[data-theme="nuit"] .sf-nav button:not(.sf-play) { background: linear-gradient(160deg, #234A3C, #16322A); color: #B6F0D2; box-shadow: inset 0 2px 0 rgba(255,255,255,.12), 0 5px 0 #0B1B15, 0 12px 18px -8px #000; }
}
