/* Boutique de livres Histoire PDF (brun #3d2c0c, or #d9a441, rouge #b5452c, crème #fdf9ef) */
.hp-bk, .hp-bk-ouvrir, .hp-bk-panneau { --brun: #3d2c0c; --or: #d9a441; --rouge: #b5452c; --creme: #fdf9ef; color: var(--brun); font-family: "Nunito", system-ui, sans-serif; max-width: 100%; }
.hp-bk h2, .hp-bk h3, .hp-bk-hero, .hp-bk-ouvrir, .hp-bk-panneau h2 { font-family: "Fredoka", "Nunito", system-ui, sans-serif; }
.hp-bk h2 { color: var(--brun); font-weight: 600; margin: 0 0 .5em; }

/* En-tête de la vitrine */
.hp-bk-hero { position: relative; overflow: hidden; background: radial-gradient(ellipse at top right, rgba(217, 164, 65, .35), transparent 60%), linear-gradient(135deg, #3d2c0c 0%, #5b3f12 100%); color: #fdf3dc; border-radius: 22px; padding: 26px 28px 22px; margin: 0 0 26px; border-bottom: 5px solid var(--or); box-shadow: 0 12px 30px rgba(61, 44, 12, .25); }
.hp-bk-surtitre { margin: 0 0 6px; color: var(--or); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .9rem; }
.hp-bk-accroche { margin: 0 0 16px; font-size: 1.35rem; line-height: 1.35; font-weight: 500; max-width: 46em; }
.hp-bk-chiffres { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hp-bk-chiffres li { background: rgba(253, 249, 239, .1); border: 1px solid rgba(217, 164, 65, .55); border-radius: 999px; padding: 6px 16px; font-size: .95rem; }
.hp-bk-chiffres b { color: #ffd27a; }

/* Grille */
.hp-bk-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.hp-bk-carte { display: flex; flex-direction: column; background: #fff; border-radius: 18px; overflow: hidden; border: 1px solid #ecdcb8; border-top: 6px solid var(--acc, #3d2c0c); box-shadow: 0 8px 22px rgba(61, 44, 12, .12); transition: transform .18s, box-shadow .18s; }
.hp-bk-carte:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(61, 44, 12, .22); }
.hp-bk-couv { display: block; background: var(--creme); line-height: 0; }
.hp-bk-couv img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: contain; }
.hp-bk-corps { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.hp-bk-sujet { align-self: flex-start; background: var(--acc, #3d2c0c); color: #ffe6ad; font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; border-radius: 999px; padding: 3px 12px; }
.hp-bk-corps h3 { margin: 2px 0 0; font-size: 1.2rem; line-height: 1.2; font-weight: 600; }
.hp-bk-corps h3 a { color: var(--brun); text-decoration: none; }
.hp-bk-corps h3 a:hover { color: var(--rouge); }
.hp-bk-sous { margin: 0; color: #6b5532; font-size: .92rem; line-height: 1.35; }
.hp-bk-meta { margin: 0; color: #8a7350; font-size: .85rem; }
.hp-bk-bas { margin-top: auto; padding-top: 8px; border-top: 1px dashed #e6d3a8; }
.hp-bk-prix { margin: 0 0 8px; font-family: "Fredoka", system-ui, sans-serif; font-size: 1.5rem; font-weight: 600; color: var(--rouge); }
.hp-bk-prix small { font-size: .55em; font-weight: 600; color: #8a7350; }
.hp-bk-actions { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hp-bk-voir { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--brun); color: var(--brun) !important; font-weight: 800; text-decoration: none !important; font-size: .9rem; }
.hp-bk-voir:hover { background: var(--brun); color: #fdf3dc !important; }
.hp-bk-ajout, .hp-bk-achat, .hp-bk-payer { border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 800; cursor: pointer; min-height: 40px; font-family: inherit; font-size: .9rem; transition: filter .15s; }
.hp-bk-ajout { background: var(--rouge); color: #fff; }
.hp-bk-ajout.dans { background: #2f7a4f; }
.hp-bk-achat, .hp-bk-payer { background: var(--or); color: var(--brun); }
.hp-bk-ajout:hover, .hp-bk-achat:hover, .hp-bk-payer:hover { filter: brightness(1.08); }
.hp-bk-gros { padding: 14px 26px; font-size: 1.05rem; min-height: 50px; }
.hp-bk-ajout:focus-visible, .hp-bk-achat:focus-visible, .hp-bk-payer:focus-visible, .hp-bk-ouvrir:focus-visible, .hp-bk-voir:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
.hp-bk-payer { width: 100%; padding: 14px; font-size: 1.05rem; }
.hp-bk-payer:disabled { opacity: .5; cursor: not-allowed; }

/* Bloc d'informations */
.hp-bk-infos { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin: 30px 0 0; }
.hp-bk-infos > div { background: var(--creme); border: 1px solid #ecdcb8; border-left: 5px solid var(--or); border-radius: 16px; padding: 16px 18px; }
.hp-bk-infos h2 { font-size: 1.2rem; }
.hp-bk-infos p { margin: 0; line-height: 1.55; }

/* Panier */
.hp-bk-ouvrir { position: fixed; right: 14px; bottom: 78px; z-index: 50; background: var(--brun); color: #fdf3dc; border: 2px solid var(--or); border-radius: 999px; padding: 11px 18px; font-weight: 600; font-size: 1rem; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); min-height: 48px; }
.hp-bk-ouvrir b { background: var(--or); color: var(--brun); border-radius: 999px; padding: 1px 9px; margin-left: 6px; }
.hp-bk-ouvrir.plein b { background: #e10600; color: #fff; }
.hp-bk-panneau { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); z-index: 100000; background: var(--creme); box-shadow: -8px 0 28px rgba(0, 0, 0, .3); padding: 18px; overflow-y: auto; border-left: 5px solid var(--or); color: var(--brun); }
.hp-bk-panneau[hidden] { display: none; }
.hp-bk-tete { display: flex; justify-content: space-between; align-items: center; }
.hp-bk-tete h2 { margin: 0; }
.hp-bk-fermer { border: 0; background: var(--brun); color: #fff; border-radius: 50%; width: 40px; height: 40px; font-size: 1.1em; cursor: pointer; }
.hp-bk-liste { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 10px; }
.hp-bk-liste li { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 8px; border: 1px solid #ecdcb8; }
.hp-bk-liste img { border-radius: 4px; }
.hp-bk-liste span { flex: 1; font-weight: 700; font-size: .95em; }
.hp-bk-retirer { border: 0; background: transparent; color: var(--rouge); font-size: 1.1em; cursor: pointer; min-width: 36px; min-height: 36px; }
.hp-bk-vide { color: #8a7350; }
.hp-bk-total { font-size: 1.2em; margin: 8px 0; }
.hp-bk-renonce { display: flex; gap: 10px; align-items: flex-start; font-size: .88em; margin: 10px 0 14px; }
.hp-bk-renonce input { margin-top: 3px; width: 20px; height: 20px; flex: none; }
.hp-bk-note { color: #8a7350; font-size: .88em; margin: 10px 0 0; }

/* Fiche d'un livre */
.hp-fiche-haut { display: grid; grid-template-columns: minmax(220px, 360px) 1fr; gap: 32px; align-items: start; margin: 0 0 30px; }
.hp-fiche-couv img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: contain; border-radius: 14px; background: var(--creme); box-shadow: 0 16px 36px rgba(61, 44, 12, .32); }
.hp-fiche-info { background: var(--creme); border: 1px solid #ecdcb8; border-top: 6px solid var(--acc, #3d2c0c); border-radius: 18px; padding: 20px 22px; }
.hp-fiche-sous { font-family: "Fredoka", system-ui, sans-serif; font-size: 1.3rem; line-height: 1.3; margin: 10px 0 4px; color: var(--brun); }
.hp-fiche-auteur { margin: 0 0 12px; color: #8a7350; font-weight: 700; letter-spacing: .02em; }
.hp-fiche-accroche { font-size: 1.12rem; line-height: 1.5; font-style: italic; margin: 0 0 14px; padding-left: 12px; border-left: 4px solid var(--or); }
.hp-fiche-chiffres { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 10px; padding: 0; margin: 0 0 14px; }
.hp-fiche-chiffres li { background: #fff; border: 2px solid var(--acc, #3d2c0c); border-radius: 12px; padding: 5px 14px; margin: 0; }
.hp-fiche-info .hp-bk-prix { font-size: 2rem; }
.hp-fiche-bloc { margin: 0 0 30px; }
.hp-fiche-presentation p { font-size: 1.05rem; line-height: 1.65; }
.hp-fiche-points { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.hp-fiche-points li { position: relative; background: #fff; border: 1px solid #ecdcb8; border-radius: 12px; padding: 10px 14px 10px 40px; margin: 0; }
.hp-fiche-points li:before { content: "✓"; position: absolute; left: 12px; top: 9px; width: 20px; height: 20px; border-radius: 50%; background: var(--or); color: var(--brun); font-weight: 900; font-size: .8rem; display: flex; align-items: center; justify-content: center; }
.hp-fiche-parties { display: grid; gap: 10px; }
.hp-fiche-partie { background: #fff; border: 1px solid #ecdcb8; border-radius: 14px; padding: 0; overflow: hidden; }
.hp-fiche-partie summary { display: flex; gap: 12px; align-items: center; cursor: pointer; padding: 12px 16px; background: var(--creme); list-style: none; }
.hp-fiche-partie summary::-webkit-details-marker { display: none; }
.hp-fiche-partie summary b { display: block; font-family: "Fredoka", system-ui, sans-serif; font-weight: 600; font-size: 1.08rem; }
.hp-fiche-partie summary small { display: block; color: #8a7350; }
.hp-fiche-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--acc, #3d2c0c); color: #ffe6ad; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.hp-fiche-partie > p { margin: 10px 16px 0; color: #6b5532; }
.hp-fiche-partie ol { margin: 10px 16px 14px 36px; columns: 2; column-gap: 28px; }
.hp-fiche-partie li { margin: 0 0 4px; break-inside: avoid; }
.hp-fiche-lien { background: var(--creme); border-radius: 12px; padding: 12px 16px; border-left: 5px solid var(--rouge); }
.hp-fiche-lien a { color: var(--rouge); font-weight: 800; }
.hp-faq details { background: #fff; border: 1px solid #ecdcb8; border-radius: 12px; padding: 10px 14px; margin: 0 0 10px; }
.hp-faq summary { cursor: pointer; font-weight: 800; color: var(--brun); }
.hp-faq details p { margin: 8px 0 0; }
.hp-bk-retour { margin: 1.2em 0 0; font-weight: 800; }
.hp-bk-retour a { color: var(--rouge); }

@media (max-width: 760px) {
  .hp-fiche-haut { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hp-fiche-couv { max-width: 300px; margin: 0 auto; }
  .hp-fiche-partie ol { columns: 1; }
  .hp-bk-grille { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .hp-bk-accroche { font-size: 1.12rem; }
  .hp-bk-hero { padding: 20px 18px; }
}
@media print { .hp-bk-ouvrir, .hp-bk-panneau, .hp-bk-ajout, .hp-bk-achat { display: none; } }
.hp-bk-ouvrir, .hp-bk-panneau { font-family: "Nunito", system-ui, sans-serif; }
