/* ==========================================================================
   Page Livres (/livres/) : accordéon de catégories (<details>). Chaque
   catégorie est un panneau à bordure avec un bouton « Masquer / Afficher » ;
   dedans, les livres Amazon en grandes cartes, puis les livrets PDF gratuits
   en liste discrète.
   ========================================================================== */

.books{display:flex;flex-direction:column;gap:1rem;padding-top:0}
.book-empty{color:#64748b}
.book-group{background:var(--color-white);border:1px solid rgba(26,43,72,0.12);border-radius:var(--radius-bento);box-shadow:var(--shadow-base);transition:border-color var(--transition-speed) ease,box-shadow var(--transition-speed) ease}
.book-group[open]{border-color:rgba(255,127,50,0.45);box-shadow:var(--shadow-hover)}
.book-group__summary{display:flex;align-items:center;gap:1rem;padding:1.1rem 1.25rem;cursor:pointer;list-style:none;border-radius:inherit}
.book-group__summary::-webkit-details-marker{display:none}
.book-group__summary:focus-visible{outline:2px solid var(--color-orange-accent);outline-offset:2px}
.book-group__head{display:flex;flex-direction:column;gap:0.25rem;margin-right:auto;min-width:0}
.book-group__eyebrow{font-size:0.75rem;font-weight:700;letter-spacing:0.12em;text-transform:uppercase;color:var(--color-orange-text)}
.book-group__title{font-size:clamp(1.25rem,3vw,1.75rem);margin:0;transition:color 0.3s ease}
.book-group__intro{font-size:0.95rem;line-height:1.5;max-width:60ch}
.book-group__summary:hover .book-group__title{color:var(--color-orange-text)}
/* Bouton de dépliage : texte + chevron dans une pastille */
.book-group__toggle{display:inline-flex;align-items:center;gap:0.5rem;flex-shrink:0;padding:0.4rem 0.5rem 0.4rem 0.9rem;border:2px solid var(--color-blue-dark);border-radius:99px;font-size:0.8rem;font-weight:600;color:var(--color-blue-dark);transition:background-color 0.2s ease,color 0.2s ease}
.book-group__summary:hover .book-group__toggle{background:var(--color-blue-dark);color:var(--color-white)}
.book-group__toggle-text--open,.book-group[open] .book-group__toggle-text--closed{display:none}
.book-group[open] .book-group__toggle-text--open{display:inline}
.book-group__chevron{flex-shrink:0;padding:3px;box-sizing:content-box;border-radius:50%;background:var(--color-orange-accent);color:var(--color-white);transition:transform var(--transition-speed) var(--easing-standard)}
.book-group[open] .book-group__chevron{transform:rotate(180deg)}
@media (max-width:480px){.book-group__toggle-text{display:none!important}.book-group__toggle{padding:0.3rem}}
.book-group[open] > :not(summary){animation:hero-fade-up 0.3s ease-out}

/* Cartes de livres : deux par ligne, toutes de la même taille. Avec image : image à gauche, texte à droite. */
.book-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem;padding:0.25rem 1.25rem 1.5rem}
@media (max-width:760px){.book-grid{grid-template-columns:minmax(0,1fr)}}
.book-card{display:flex;flex-direction:row;gap:1.25rem;align-items:flex-start;padding:1.25rem;height:100%}
.book-card__coverlink{display:block;flex:0 0 96px;width:96px}
.book-card__cover{display:block;width:100%;height:auto;border-radius:3px;box-shadow:var(--shadow-hover);transition:transform 0.2s ease}
a.book-card__coverlink:hover .book-card__cover{transform:scale(1.03)}
.book-card__titlelink,.book-free__titlelink{color:inherit;text-decoration:none}
a.book-card__titlelink:hover{color:var(--color-orange-text)}
a.book-free__titlelink:hover mark{background:#fde047}
.book-card__body{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;align-self:stretch}
.book-card__head{display:flex;justify-content:space-between;align-items:flex-start;gap:0.5rem;margin-bottom:0.6rem}
.book-card__title{font-size:1.1rem;line-height:1.3;margin:0}
.book-card__title mark{padding:0.05em 0.3em}
.book-card__head .badge{font-size:0.75rem;padding:0.15rem 0.5rem}
.book-card__text{flex-grow:1;font-size:0.85rem;line-height:1.55;display:-webkit-box;-webkit-line-clamp:6;line-clamp:6;-webkit-box-orient:vertical;overflow:hidden}
.book-card__actions{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem 1rem;margin-top:1rem}
.book-card__buy{margin-left:auto;flex-shrink:0;white-space:nowrap}
.book-card__actions:has(.book-card__buy){flex-wrap:nowrap}
.book-card__actions:has(.book-card__buy) .book-card__more{flex:1 1 0;min-width:0}
@media (max-width:480px){.book-card__actions:has(.book-card__buy){flex-wrap:wrap}}
.book-card__actions .btn{padding:0.55rem 1rem;font-size:0.85rem}
.book-card__more{font-size:0.8rem;font-weight:500;color:var(--color-blue-dark);overflow-wrap:anywhere}
.book-card__more:hover{color:var(--color-orange-text)}

/* Livrets PDF gratuits : liste discrète à filets (inchangée), sous les cartes */
.book-free{padding:0.25rem 1.25rem 1.25rem}
.book-free__heading{font-family:var(--font-body);font-size:0.75rem;font-weight:700;letter-spacing:0.12em;text-transform:uppercase;color:#64748b;margin-bottom:0.25rem}
.book-free__list{list-style:none}
.book-free__item{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:0.85rem 0;border-top:1px solid #E2E8F0}
.book-free__item:first-child{border-top:0}
.book-free__item.has-cover{justify-content:flex-start}
.book-free__item.has-cover .book-free__text{flex:1 1 auto}
.book-free__item.has-cover .book-free__link{margin-left:auto}
.book-free__coverlink{display:block;flex:0 0 48px;width:48px}
.book-free__cover{display:block;width:100%;height:auto;border-radius:2px;box-shadow:var(--shadow-base)}
.book-free__text{display:flex;flex-direction:column;gap:0.15rem;min-width:0}
.book-free__title{font-size:0.95rem;color:var(--color-blue-dark)}
.book-free__title mark{padding:0.05em 0.3em}
.book-free__desc{font-size:0.8rem;line-height:1.5;color:#64748b;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.book-free__link{display:inline-flex;align-items:center;gap:0.4rem;flex-shrink:0;padding:0.4rem 0.8rem;border:1px solid rgba(26,43,72,0.25);border-radius:var(--radius-btn);font-size:0.8rem;font-weight:600;color:var(--color-blue-dark);text-decoration:none;transition:background-color 0.2s ease,color 0.2s ease,border-color 0.2s ease}
.book-free__link:hover{background:var(--color-blue-dark);border-color:var(--color-blue-dark);color:var(--color-white)}
@media (max-width:600px){.book-free__item{flex-direction:column;align-items:flex-start}}

/* Livrets et manuscrits sur demande : déclencheurs en boutons, présentés comme les liens */
button.book-free__titlelink,button.book-free__coverlink,button.book-free__link{font:inherit;cursor:pointer;text-align:left}
button.book-free__titlelink,button.book-free__coverlink{border:0;padding:0;background:none}
button.book-free__titlelink:hover mark{background:#fde047}
button.book-free__link{background:transparent}
button.book-card__more{border:0;background:none;padding:0;font-family:inherit;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
