/* =========================
   CATALOGUE — VERSION FINALE PROPRE
========================= */

.hedna-catalogue .site-shell,
.hedna-catalogue-layout.site-shell,
.hedna-catalogue-header.site-shell {
    max-width: 1320px;
    width: min(calc(100% - 48px), 1320px);
    margin-left: auto;
    margin-right: auto;
}

.hedna-catalogue {
    padding-top: 26px;
    padding-bottom: 40px;
}

.hedna-catalogue-header {
    margin-bottom: 0;
}

.hedna-catalogue-header h1 {
    margin: 0 0 14px;
    font-size: 48px;
    line-height: 1.05;
    font-weight: 700;
    color: #111;
}

.hedna-catalogue-header p {
    margin: 0;
    max-width: 620px;
    font-size: 17px;
    line-height: 1.65;
    color: #666;
}

.hedna-catalogue-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 295px;
    gap: 46px;
    align-items: start;
    margin-top: 56px;
}

.hedna-catalogue-main {
    min-width: 0;
}

.hedna-catalogue-sidebar {
    min-width: 0;
    padding: 26px 0 0 30px;
    border-left: 1px solid #dddddd;
    position: sticky;
    top: 24px;
}

.hedna-block {
    margin-bottom: 54px;
}

.hedna-block h2 {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 0 0 28px;
    font-size: 26px;
    line-height: 1.15;
    font-weight: 700;
    color: #111;
}

.hedna-block h2::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #dddddd;
    transform: translateY(1px);
}

.hedna-separator {
    display: none;
}

.hedna-books-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 22px;
}

.hedna-book-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    padding: 16px 16px 18px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hedna-book-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
}

.hedna-book-media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    min-height: 320px;
    background: #efefef;
    border: 1px solid #e3e3e3;
    overflow: hidden;
    margin-bottom: 14px;
}

.hedna-book-media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center;
}

.hedna-book-meta {
    padding-top: 0;
}

.hedna-book-meta h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.32;
    font-weight: 700;
    color: #111;
}

.hedna-book-price {
    font-size: 15px;
    line-height: 1.4;
    color: #8a8a8a;
}

.hedna-catalogue-sidebar h3 {
    margin: 0 0 16px;
    font-size: 21px;
    line-height: 1.15;
    font-weight: 700;
    color: #111;
}

.hedna-catalogue-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0 0 34px;
}

.hedna-catalogue-sidebar li {
    margin-bottom: 12px;
    font-size: 16px;
    line-height: 1.45;
    color: #666;
    transition: color 0.18s ease, transform 0.18s ease;
}

.hedna-catalogue-sidebar li:hover {
    color: #111;
    transform: translateX(2px);
}

.hedna-catalogue-sidebar h3 + ul {
    padding-bottom: 10px;
    border-bottom: 1px solid #ececec;
}

.hedna-promo {
    margin-top: 26px;
    padding: 32px 34px;
    background: linear-gradient(135deg, #ffffff 0%, #f7f7f7 100%);
    border: 1px solid #e3e3e3;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
    position: relative;
}

.hedna-promo::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 34px;
    width: 90px;
    height: 3px;
    background: #111;
}

.hedna-promo-inner {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 22px;
    align-items: center;
}

.hedna-promo-text h3 {
    margin: 0 0 10px;
    font-size: 30px;
    line-height: 1.1;
    color: #111;
}

.hedna-promo-text p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: #555;
}

.hedna-promo-book {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hedna-promo-book img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 240px;
    border: 1px solid #e7e7e7;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.10);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1100px) {
    .hedna-authors-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hedna-authors-letter-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hedna-authors-alpha-block__title {
        font-size: 30px;
    }

    .hedna-catalogue-layout {
        grid-template-columns: 1fr 250px;
        gap: 30px;
    }
}

@media (max-width: 960px) {
    .hedna-catalogue-layout {
        grid-template-columns: 1fr;
    }

    .hedna-catalogue-sidebar {
        position: static;
        padding: 28px 0 0;
        border-left: none;
        border-top: 1px solid #dddddd;
    }

    .hedna-books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .hedna-authors-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hedna-author-card__media {
        min-height: 190px;
    }

    .hedna-authors-alpha-block {
        margin-top: 34px;
    }

    .hedna-authors-alpha-block__title {
        font-size: 26px;
    }

    .hedna-authors-letter-title {
        font-size: 24px;
    }
}

@media (max-width: 640px) {
    .hedna-authors-letter-items {
        grid-template-columns: 1fr;
    }

    .hedna-authors-alpha-nav {
        gap: 8px 10px;
    }

    .hedna-authors-alpha-block__title {
        font-size: 24px;
    }

    .hedna-catalogue {
        padding-top: 18px;
    }

    .hedna-catalogue-layout {
        margin-top: 36px;
    }

    .hedna-catalogue-header h1 {
        font-size: 38px;
    }

    .hedna-books-grid {
        grid-template-columns: 1fr;
    }

    .hedna-catalogue .site-shell,
    .hedna-catalogue-layout.site-shell,
    .hedna-catalogue-header.site-shell {
        width: min(calc(100% - 28px), 1320px);
    }
}

/* =========================
   FICHE DE LECTURE — VERSION INTÉGRÉE PROPRE
========================= */

.hedna-book-card {
    position: relative;
}

.hedna-book-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* =========================
   MARQUE-PAGE VERTICAL (PERPENDICULAIRE)
========================= */

.hedna-bookmark-toggle {
    position: absolute;
    top: -6px;
    right: 18px;
    z-index: 8;

    border: 0;
    cursor: pointer;

    width: 22px;
    height: 90px;

    padding: 6px 0;

    display: flex;
    align-items: center;
    justify-content: center;

    color: rgba(255,255,255,0.95);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: center;

    writing-mode: vertical-rl;
    text-orientation: mixed;

    border-radius: 2px;

    box-shadow: 0 3px 8px rgba(0,0,0,0.12);

    transform: translateY(0);
    transition: transform 0.2s ease, opacity 0.2s ease;

    opacity: 0.9;
}

/* encoche propre */
.hedna-bookmark-toggle::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 6px solid currentColor;
}

/* hover */
.hedna-book-card:hover .hedna-bookmark-toggle {
    transform: translateY(2px);
    opacity: 1;
}
/* =========================
   COULEURS PAR CATÉGORIE
========================= */

/* 🔥 ROMAN → VERT (comme demandé) */
.hedna-book-card.bookmark-roman .hedna-bookmark-toggle {
    background: #5e8f5e;
}

/* ESSAI */
.hedna-book-card.bookmark-essai .hedna-bookmark-toggle {
    background: #6f8d63;
}

/* POÉSIE */
.hedna-book-card.bookmark-poesie .hedna-bookmark-toggle {
    background: #7d6a96;
}

/* FORMAT */
.hedna-book-card.bookmark-papier .hedna-bookmark-toggle {
    background: #b58a63;
}

.hedna-book-card.bookmark-numerique .hedna-bookmark-toggle {
    background: #6d8fa8;
}

.hedna-book-card.bookmark-audio .hedna-bookmark-toggle {
    background: #7a8870;
}

/* fallback */
.hedna-book-card.bookmark-default .hedna-bookmark-toggle {
    background: #9b846f;
}

/* =========================
   PANNEAU FICHE (PROPRE)
========================= */

.hedna-bookmark-panel {
    position: absolute;
    top: 62px;
    left: 16px;
    right: 16px;
    z-index: 20;

    display: none;

    background: #fff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 14px 26px rgba(0,0,0,0.12);
    border-radius: 4px;
}

.hedna-book-card.is-reading-open .hedna-bookmark-panel {
    display: block;
}

.hedna-bookmark-panel__inner {
    padding: 16px;
    font-size: 13px;
    line-height: 1.55;
    color: #444;

    max-height: 170px;
    overflow-y: auto;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* fermer */
.hedna-bookmark-close {
    position: absolute;
    top: 6px;
    right: 8px;
    border: 0;
    background: transparent;
    color: #999;
    font-size: 20px;
    cursor: pointer;
}

/* CTA */
.hedna-book-btn {
    display: inline-block;
    margin-top: 8px;
    font-size: 14px;
    color: #666;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .hedna-bookmark-toggle {
        font-size: 8px;
        padding: 5px 8px 12px;
        right: 10px;
    }

    .hedna-bookmark-panel {
        left: 12px;
        right: 12px;
    }

    .hedna-bookmark-panel__inner {
        max-height: 140px;
        font-size: 12px;
    }
}

/* =========================
   META LIVRE — AUTEUR
========================= */

.hedna-book-author {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 500;
    color: #777;
}

/* =========================
   ACTIONS LIVRE
========================= */

.hedna-book-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

/* =========================
   BOUTONS (STYLE ACCUEIL)
========================= */

.hedna-book-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 42px;
    padding: 0 16px;

    border: 1px solid #111;
    background: #fff;
    color: #111;

    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;

    transition: all 0.18s ease;
}

/* bouton prix */
.hedna-book-btn--price {
    cursor: default;
    border-color: #ddd;
    color: #555;
}

/* bouton voir */
.hedna-book-btn--view:hover {
    background: #111;
    color: #fff;
}

.hedna-book-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 640px) {

    .hedna-book-actions {
        gap: 8px;
    }

    .hedna-book-btn {
        height: 40px;
        padding: 0 12px;
        font-size: 12px;
    }
}