/* Prime XI — étagère d'albums, album façon Panini, profil public et vitrine. Chargé après theme.css. */

/* ---------- étagère d'albums (couvertures de livres) ---------- */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.book {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; aspect-ratio: 3 / 4; padding: 14px 14px 14px 22px;
  border-radius: 6px 12px 12px 6px; text-decoration: none; overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .16), transparent 40%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .04) 0 14px, transparent 14px 28px),
    linear-gradient(160deg, hsl(var(--hue) 55% 34%), hsl(var(--hue) 60% 14%));
  box-shadow: 6px 8px 18px rgba(0, 0, 0, .5), inset -2px 0 0 rgba(255, 255, 255, .08);
  transition: transform .25s;
}
.book:hover { transform: translateY(-5px) rotate(-1deg); }
.book-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 10px; background: linear-gradient(90deg, rgba(0, 0, 0, .45), rgba(0, 0, 0, .1)); }
.book-mark { position: absolute; top: 14px; right: 14px; font-family: var(--font-display); font-size: 14px; border: 1.5px solid currentColor; border-radius: 4px; padding: 0 4px; opacity: .8; }
.book-title { font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 1.05; text-transform: uppercase; }
.book-count { font-size: 12px; font-weight: 800; opacity: .85; }
.book-bar { height: 5px; border-radius: 3px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.book-bar i { display: block; height: 100%; background: var(--accent); }
.book.done { box-shadow: 0 0 0 2px var(--accent), 6px 8px 18px rgba(0, 0, 0, .5); }

/* ---------- album Panini ---------- */
.album-head { margin-bottom: 18px; }
.album-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.album-progress { min-width: 200px; text-align: right; }
.album-progress b { font-size: 22px; margin-right: 8px; }
.album-book { display: grid; gap: 0; perspective: 2200px; transition: transform .38s ease, opacity .38s; }
.album-book.spread-2 { grid-template-columns: 1fr 1fr; }
.album-page {
  position: relative; padding: 16px 16px 12px; color: #1d2a22;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, .7), transparent 70%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .025) 0 1px, transparent 1px 4px),
    #efe9d8;
  box-shadow: inset 0 0 40px rgba(120, 100, 60, .25), 0 20px 50px -20px rgba(0, 0, 0, .8);
}
.album-page.left { border-radius: 12px 2px 2px 12px; box-shadow: inset -24px 0 30px -18px rgba(0, 0, 0, .35), inset 0 0 40px rgba(120, 100, 60, .25), 0 20px 50px -20px rgba(0, 0, 0, .8); }
.album-page.right { border-radius: 2px 12px 12px 2px; box-shadow: inset 24px 0 30px -18px rgba(0, 0, 0, .35), inset 0 0 40px rgba(120, 100, 60, .25), 0 20px 50px -20px rgba(0, 0, 0, .8); }
.album-page.single { border-radius: 12px; }
.album-page header { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; margin-bottom: 12px; border-radius: 8px; background: #13301f; color: var(--accent); }
.album-page header b { font-family: var(--font-display); font-weight: 400; font-size: 18px; letter-spacing: .5px; text-transform: uppercase; color: #fff; }
.album-page header span { font-weight: 800; font-size: 13px; }
.album-page footer { text-align: center; font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #7a7461; margin-top: 10px; }
.sticker-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sticker-slot { position: relative; aspect-ratio: 5 / 7; border-radius: 10px; }
.sticker-slot.filled .card { width: 100%; height: 100%; transform: rotate(var(--tilt)); box-shadow: 2px 4px 10px rgba(0, 0, 0, .35); }
.sticker-slot.filled:hover .card { transform: rotate(0) scale(1.04); }
.slot-no { position: absolute; top: -8px; left: -6px; z-index: 8; background: #13301f; color: var(--accent); font-size: 10px; font-weight: 800; padding: 1px 6px; border-radius: 999px; }
.sticker-slot.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none; text-align: center; padding: 8px;
  border: 2px dashed color-mix(in srgb, var(--rc) 55%, #b9b19a); background: rgba(255, 255, 255, .45); color: #6b6553;
}
.sticker-slot.empty:hover { background: rgba(255, 255, 255, .75); }
.slot-big { font-family: var(--font-display); font-size: 34px; line-height: 1; color: #b3ab92; }
.slot-name { font-size: 11px; font-weight: 800; line-height: 1.2; color: #4d483b; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.slot-rar { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--rc); }
.sticker-slot.blank { visibility: hidden; }
.back-cover { display: grid; place-items: center; background: linear-gradient(160deg, #1d4a32, #0b1f15); }
.cover-mark { font-family: var(--font-display); font-size: 60px; color: var(--accent); border: 3px solid var(--accent); border-radius: 14px; padding: 0 18px; opacity: .7; }
.album-nav { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 16px; }
.album-nav .btn { min-width: 56px; font-size: 22px; }
.album-hint { text-align: center; }
.album-book.turn-next { transform: translateX(-30px) rotateY(12deg); opacity: 0; }
.album-book.turn-prev { transform: translateX(30px) rotateY(-12deg); opacity: 0; }
.album-book.enter-next { transform: translateX(30px) rotateY(-10deg); opacity: 0; transition: none; }
.album-book.enter-prev { transform: translateX(-30px) rotateY(10deg); opacity: 0; transition: none; }

/* ---------- profil public & vitrine ---------- */
.profile-hero {
  display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 22px; border-radius: 22px;
  border: 1px solid rgba(215, 255, 62, .18); background: linear-gradient(120deg, rgba(25, 70, 48, .9), rgba(10, 24, 18, .95));
}
.profile-id { display: flex; gap: 16px; align-items: center; }
.av-xl { width: 76px; height: 76px; font-size: 30px; box-shadow: 0 0 0 3px var(--accent), 0 0 30px -6px var(--accent); }
.profile-id p { margin: 6px 0 0; }
.profile-stats { display: grid; grid-template-columns: repeat(4, auto); gap: 22px; text-align: center; }
.profile-stats b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 28px; }
.profile-stats small { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; }
.profile-actions { grid-column: 1 / -1; justify-content: flex-start; }
.showcase {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 20px; border-radius: 20px;
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(246, 226, 122, .12), transparent 70%),
    linear-gradient(180deg, rgba(40, 32, 12, .55), rgba(10, 12, 8, .8));
  border: 1px solid rgba(246, 226, 122, .25); box-shadow: inset 0 0 40px rgba(0, 0, 0, .5);
}
.show-slot { position: relative; aspect-ratio: 5 / 7; }
.show-slot .card { width: 100%; height: 100%; }
.show-slot.empty { display: grid; place-items: center; border: 2px dashed rgba(246, 226, 122, .3); border-radius: 12px; color: rgba(246, 226, 122, .4); font-family: var(--font-display); font-size: 28px; }
.slot-x { position: absolute; top: -8px; right: -8px; z-index: 9; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--danger); color: #fff; font-weight: 800; cursor: pointer; }
.who-link { color: inherit; text-decoration: none; border-bottom: 1px dotted rgba(255, 255, 255, .3); }
.who-link:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 900px) {
  .profile-hero { grid-template-columns: 1fr; }
  .profile-stats { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .profile-stats b { font-size: 22px; }
  .showcase { gap: 8px; padding: 10px; }
}
@media (max-width: 560px) {
  .showcase { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sticker-grid { gap: 8px; }
  .slot-big { font-size: 24px; }
  .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- l'album se remplit tout seul : les nouveaux autocollants se collent avec une animation ---------- */
.sticker-slot.just-stuck .card { animation: stickIn .7s cubic-bezier(.2, 1.3, .4, 1) both; animation-delay: var(--d, 0ms); }
.sticker-slot.just-stuck::after {
  content: ''; position: absolute; inset: -6px; border-radius: 14px; pointer-events: none; z-index: 9;
  box-shadow: 0 0 0 3px var(--accent), 0 0 26px var(--accent); opacity: 0;
  animation: stickGlow 1.6s ease-out both; animation-delay: calc(var(--d, 0ms) + .45s);
}
@keyframes stickIn {
  0% { transform: translateY(-60px) rotate(-14deg) scale(1.25); opacity: 0; filter: brightness(1.6); }
  60% { transform: translateY(4px) rotate(calc(var(--tilt) + 2deg)) scale(.97); opacity: 1; }
  100% { transform: rotate(var(--tilt)); opacity: 1; filter: none; }
}
@keyframes stickGlow { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
.book-new {
  position: absolute; top: 12px; left: 18px; z-index: 2; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800;
  color: var(--accent-ink); background: var(--accent); box-shadow: 0 0 14px rgba(215, 255, 62, .7); animation: livePulse 1.6s infinite;
}
@media (prefers-reduced-motion: reduce) { .sticker-slot.just-stuck .card, .sticker-slot.just-stuck::after { animation: none; } }
