/*
 * Thème bookstore (chargé par no-js : theme://css/custom.css). Couleurs en variables : css/custom-dark.css les redéfinit
 * pour le thème sombre (chargée à part, voir templates/partials/assets.html.twig du thème no-js).
 */
:root {
    --bk-card-bg: #fff;
    --bk-border: #ddd;
    --bk-muted: #666;
    --bk-subtle: #555;
    --bk-price: #b12704;
    --bk-accent: #0275d8;
    --bk-accent-contrast: #fff;
    --bk-surface: #f5f5f5;
    --bk-notice-bg: #fcf8e3;
    --bk-notice-border: #faebcc;
    --bk-notice-text: #8a6d3b;
    --bk-danger: #a94442;
    --bk-stock-out: #d9534f;
    --bk-alert-bg: #ffebeb;
    --bk-shadow: rgba(0, 0, 0, .1);
    --bk-pos-bg: #f9f9f9;
    --bk-pos-border: #eee;
    --bk-pos-title: #222;
    --bk-pos-link-bg: #333;
    --bk-pos-link-hover: #555;
}

/* Logo : version claire par défaut, version sombre affichée par custom-dark.css */
.logo .logo-dark { display: none; }

/* --- Grille et carte de livre (macros/books.html.twig) --- */
.books-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; margin: 1rem 0 2rem; }
.no-books-found { color: var(--bk-muted); font-style: italic; }
.book-card { border: 1px solid var(--bk-border); padding: 1rem; border-radius: 8px; background: var(--bk-card-bg);
    display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.book-card .book-card-cover { display: block; margin-bottom: 1rem; }
.book-card .book-card-cover img { display: block; width: 100%; height: auto; border-radius: 4px; }
.book-card h3 { margin: 0 0 .5rem; font-size: 1.1rem; }
.book-card .book-card-author { font-size: .9rem; color: var(--bk-muted); margin: 0 0 .5rem; }
.book-card .book-card-footer { margin-top: auto; display: flex; flex-direction: column; gap: .25rem; }
.book-card .book-card-presale-date { font-size: .9rem; font-style: italic; font-weight: bold; color: var(--bk-accent); margin-bottom: .25rem; }
.book-card .book-card-price { font-weight: bold; color: var(--bk-price); }
.book-card .book-card-more { font-size: .9rem; font-style: italic; color: var(--bk-muted); }

/* --- Page livre (book.html.twig) : colonne unique sur mobile, couverture + contenu dès 720 px --- */
.book-profile .book-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 1.5rem; }
.book-profile .book-cover { justify-self: center; width: min(70%, 300px); }
.book-profile .book-cover img { display: block; width: 100%; height: auto; border-radius: 4px; box-shadow: 0 4px 8px var(--bk-shadow); }
.book-profile .book-subtitle { margin: .25rem 0 0; font-size: 1.1rem; color: var(--bk-subtle); }
.book-profile .book-section { margin-bottom: 1.75rem; }
.book-profile .book-section > h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
.book-profile .book-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .5rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.book-profile .book-downloads { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.book-profile .book-downloads a { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; padding: .75rem 1rem;
    border: 1px solid var(--bk-border); border-radius: 4px; text-decoration: none; }
.book-profile .book-downloads a:hover, .book-profile .book-downloads a:focus { background: var(--bk-surface); }
.book-profile .book-downloads .dl-name { font-weight: 600; word-break: break-word; }
.book-profile .book-downloads .dl-meta { font-size: .85rem; color: var(--bk-muted); }
@media (min-width: 720px) {
    .book-profile .book-layout { grid-template-columns: minmax(200px, 300px) 1fr; gap: 2rem; align-items: start; }
    .book-profile .book-cover { width: 100%; justify-self: stretch; position: sticky; top: 1rem; }
}
.alternative-purchase { padding: 1.25rem; background: var(--bk-notice-bg); border: 1px solid var(--bk-notice-border); border-radius: 4px; color: var(--bk-notice-text); }
.alternative-purchase .alternative-purchase-text { margin: 0 0 1rem; font-weight: 500; }
.alternative-purchase .alternative-purchase-unavailable { margin: 0; font-weight: bold; color: var(--bk-danger); }

/* --- Zone d'achat (partials/simple-shop/buy-zone.html.twig) --- */
.product-purchase { margin-top: 1.5rem; padding: 1rem; background: var(--bk-surface); border-radius: 4px; }
.product-purchase .presale-notice { font-size: .95rem; font-weight: bold; color: var(--bk-accent); margin-bottom: .5rem; }
.product-purchase .product-price { font-size: 1.4rem; font-weight: bold; margin-bottom: .5rem; }
.product-purchase .presale-label { font-size: .9rem; color: var(--bk-accent); display: block; font-weight: normal; }
.product-purchase .product-stock { font-size: .9rem; color: var(--bk-muted); margin-bottom: 1rem; }
.product-purchase .stock-out { color: var(--bk-stock-out); font-weight: bold; }
.product-purchase .simple-shop-add-form { display: flex; gap: 1rem; }
.product-purchase .btn-buy { padding: .75rem 1.5rem; background: var(--bk-accent); color: var(--bk-accent-contrast); border: none;
    border-radius: 4px; cursor: pointer; font-weight: bold; }

/* --- Accueil, barre latérale --- */
.home-alert { text-align: center; margin-top: 1.5rem; padding: 1rem; background: var(--bk-alert-bg); border-radius: 4px; }
.catalog-link { font-size: 1.5em; text-decoration: overline; }

/* --- Points de vente (points-of-sale.html.twig) --- */
.pos-container { max-width: 1200px; margin: 0 auto; padding: 2rem; }
.pos-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; margin-top: 2rem; }
.pos-card { background: var(--bk-pos-bg); border: 1px solid var(--bk-pos-border); border-radius: 6px; padding: 1.5rem; box-shadow: 0 2px 4px rgba(0, 0, 0, .02); }
.pos-card h2 { margin-top: 0; color: var(--bk-pos-title); font-size: 1.3rem; border-bottom: 2px solid var(--bk-border); padding-bottom: .5rem; }
.pos-address { margin: 1rem 0; line-height: 1.5; }
.pos-contact p { margin: .4rem 0; font-size: .95rem; }
.pos-link { margin-top: 1rem !important; }
.pos-link a { display: inline-block; background: var(--bk-pos-link-bg); color: #fff; padding: .4rem .8rem; border-radius: 4px; text-decoration: none; font-size: .9rem; }
.pos-link a:hover { background: var(--bk-pos-link-hover); }
@media (max-width: 768px) { .pos-grid { grid-template-columns: 1fr; } }
