

/* =========================
   HEDNA — FIX PRIX CATALOGUE
========================= */

/* Supprime tous les cadres moches autour du prix */
.hedna-book-actions .price,
.hedna-book-actions span,
.hedna-book-actions bdi {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Aligne prix + bouton proprement */
.hedna-book-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

/* Style prix normal */
.hedna-book-actions .price {
    font-size: 16px;
    font-weight: 600;
    color: #111;
}

/* Ancien prix (barré) */
.hedna-book-actions del {
    color: #999;
    font-size: 14px;
    margin-right: 6px;
}

/* Nouveau prix */
.hedna-book-actions ins {
    text-decoration: none;
    font-weight: 600;
    color: #111;
}

/* Harmonisation du texte prix (7 € / 20 €) */
.hedna-book-actions .price {
    letter-spacing: 0.02em;
}

/* Nettoie les marges parasites */
.hedna-book-actions * {
    margin: 0;
}

/* Petit effet hover subtil sur carte */
.hedna-book-card:hover {
    transform: translateY(-2px);
    transition: 0.2s ease;
}

/* =========================
   HEDNA — BOOST VISUEL
========================= */

/* Cartes plus blanches et propres */
.hedna-book-card {
    background: #fff;
    border: 1px solid #eee;
}

/* Prix plus présent */
.hedna-book-actions .price {
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

/* Ancien prix plus discret */
.hedna-book-actions del {
    opacity: 0.5;
}

/* Bouton plus éditorial */
.hedna-book-btn {
    border: none;
    background: #111;
    color: #fff;
}

.hedna-book-btn:hover {
    background: #333;
}

/* Auteur plus léger */
.hedna-book-author {
    font-size: 14px;
    color: #888;
}

/* Titre plus impactant */
.hedna-book-title {
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* =========================
   HEDNA — MOBILE CATALOGUE FIX
========================= */

@media (max-width: 768px) {

    /* Grille catalogue en une seule colonne */
    .hedna-books-grid {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    /* Cartes plus propres sur mobile */
    .hedna-book-card {
        width: 100%;
        padding: 0 0 18px;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    /* Image */
    .hedna-book-media {
        margin-bottom: 16px;
        aspect-ratio: auto;
        background: transparent;
    }

    .hedna-book-media img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: contain;
    }

    /* Bloc texte */
    .hedna-book-meta {
        padding: 0;
    }

    .hedna-book-title,
    .hedna-book-meta h2,
    .hedna-book-meta h3 {
        font-size: 26px;
        line-height: 1.2;
        margin: 0 0 10px;
    }

    .hedna-book-author,
    .hedna-book-meta p {
        font-size: 16px;
        margin: 0 0 18px;
        color: #555;
    }

    /* Ligne prix + bouton devient verticale */
    .hedna-book-actions {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin-top: 0;
    }

    /* Prix */
    .hedna-book-actions .price {
        font-size: 18px;
        line-height: 1.3;
        white-space: normal;
    }

    .hedna-book-actions del,
    .hedna-book-actions ins,
    .hedna-book-actions bdi,
    .hedna-book-actions span {
        font-size: inherit;
    }

    /* Bouton */
    .hedna-book-btn,
    .hedna-book-btn--view {
        width: auto;
        min-width: 110px;
        height: 42px;
        padding: 0 18px;
    }

    /* Sidebar catalogue sous la grille */
    .hedna-catalogue-sidebar {
        border-left: 0 !important;
        padding-left: 0 !important;
        margin-top: 32px;
    }

    /* Évite les débordements */
    .hedna-catalogue,
    .site-shell,
    .hedna-book-card,
    .hedna-book-meta,
    .hedna-book-actions {
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
}

/* =========================
   HEDNA — MOBILE ÉQUILIBRÉ
   image + titre + auteur + bouton
========================= */

@media (max-width: 768px) {

    .hedna-books-grid {
        display: grid;
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .hedna-book-card {
        padding: 0 0 18px !important;
        border: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .hedna-book-media {
        margin: 0 0 12px !important;
        background: transparent !important;
    }

    .hedna-book-media img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    .hedna-book-title,
    .hedna-book-meta h2,
    .hedna-book-meta h3 {
        font-size: 22px !important;
        font-weight: 700 !important;
        margin: 0 0 6px !important;
        line-height: 1.2 !important;
    }

    .hedna-book-author,
    .hedna-book-meta p {
        font-size: 15px !important;
        color: #666 !important;
        margin: 0 0 12px !important;
    }

    .hedna-book-actions .price,
    .hedna-book-actions del,
    .hedna-book-actions ins,
    .hedna-book-actions bdi,
    .hedna-book-actions span {
        display: none !important;
    }

    .hedna-book-actions {
        display: block !important;
        margin-top: 6px !important;
    }

    .hedna-book-btn,
    .hedna-book-btn--view {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 110px !important;
        height: 42px !important;
        padding: 0 18px !important;
        border: 1px solid #111 !important;
        background: #111 !important;
        color: #fff !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
    }

    .hedna-catalogue-sidebar {
        display: none !important;
    }

    .hedna-book-card .tab,
    .hedna-book-card .tabs,
    .hedna-book-card .fiche,
    .hedna-book-card .close,
    .hedna-book-card .popup,
    .hedna-book-card .modal,
    .hedna-book-card button,
    .hedna-book-card .woocommerce-tabs,
    .hedna-book-card .panel {
        display: none !important;
    }
}

/* =========================
   HEDNA — FICHE PRODUIT + ÉDITIONS
   VERSION NETTOYÉE
========================= */

.single-product .site-main,
.single-product .content-area,
.single-product .woocommerce,
.single-product .product,
.single-product .site-content {
    background: transparent !important;
}

.single-product div.product {
    display: grid !important;
    grid-template-columns: minmax(320px, 420px) minmax(420px, 1fr) !important;
    gap: 56px !important;
    max-width: 1360px !important;
    margin: 0 auto 56px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    align-items: start !important;
}

.single-product .product_title,
.single-product h1.product_title {
    grid-column: 1 / -1 !important;
    font-size: clamp(40px, 5vw, 72px) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.03em !important;
    font-weight: 700 !important;
    color: #111 !important;
    margin: 0 0 8px !important;
    max-width: 760px !important;
}

.single-product div.product .woocommerce-product-gallery {
    width: 100% !important;
    max-width: 420px !important;
    margin: 0 !important;
    float: none !important;
}

.single-product div.product .woocommerce-product-gallery__wrapper,
.single-product div.product .woocommerce-product-gallery__image {
    background: #fff !important;
}

.single-product div.product .woocommerce-product-gallery img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
}

.single-product div.product .summary {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    box-sizing: border-box !important;
}

.single-product .summary > p:first-of-type {
    font-size: 16px !important;
    color: #555 !important;
    margin: 0 0 18px !important;
}

.single-product div.product p.price,
.single-product div.product span.price {
    font-size: 40px !important;
    line-height: 1.15 !important;
    font-weight: 600 !important;
    color: #111 !important;
    margin: 0 0 26px !important;
}

.single-product div.product p.price del,
.single-product div.product span.price del {
    opacity: 0.45 !important;
    font-size: 0.65em !important;
    margin-right: 10px !important;
}

.single-product div.product p.price ins,
.single-product div.product span.price ins {
    text-decoration: none !important;
    color: #111 !important;
}

.single-product form.variations_form {
    margin: 0 0 24px !important;
}

.single-product table.variations {
    width: 100% !important;
    margin: 0 0 16px !important;
    border: 0 !important;
}

.single-product table.variations td,
.single-product table.variations th {
    padding: 0 0 12px 0 !important;
    vertical-align: middle !important;
    display: block !important;
    width: 100% !important;
}

.single-product table.variations label {
    display: block !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #111 !important;
    margin-bottom: 8px !important;
}

.single-product table.variations select {
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    padding: 0 12px !important;
    border: 1px solid #d3d3d3 !important;
    background: #fff !important;
    color: #111 !important;
}

.single-product form.cart {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin: 0 0 26px !important;
}

.single-product .quantity .qty {
    width: 68px !important;
    height: 44px !important;
    border: 1px solid #d3d3d3 !important;
    background: #fff !important;
}

.single-product button.single_add_to_cart_button,
.single-product .single_add_to_cart_button.button {
    height: 44px !important;
    padding: 0 20px !important;
    border: 1px solid #111 !important;
    background: #111 !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    transition: all 0.18s ease !important;
}

.single-product button.single_add_to_cart_button:hover,
.single-product .single_add_to_cart_button.button:hover {
    background: #fff !important;
    color: #111 !important;
}

.single-product .product_meta {
    font-size: 14px !important;
    line-height: 1.8 !important;
    color: #555 !important;
    border-top: 1px solid #eee !important;
    padding-top: 18px !important;
    margin-top: 10px !important;
}

.single-product .product_meta a {
    color: #333 !important;
    text-decoration: none !important;
}

.single-product .woocommerce-tabs {
    grid-column: 1 / -1 !important;
    clear: both !important;
    margin-top: 10px !important;
    padding-top: 34px !important;
    border-top: 1px solid #eee !important;
}

.single-product .woocommerce-tabs ul.tabs {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    padding: 0 !important;
    margin: 0 0 24px !important;
    border: 0 !important;
}

.single-product .woocommerce-tabs ul.tabs::before,
.single-product .woocommerce-tabs ul.tabs::after {
    display: none !important;
}

.single-product .woocommerce-tabs ul.tabs li {
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #ddd !important;
    background: #f7f7f7 !important;
    border-radius: 0 !important;
}

.single-product .woocommerce-tabs ul.tabs li a {
    display: block !important;
    padding: 12px 18px !important;
    color: #111 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.single-product .woocommerce-tabs ul.tabs li.active {
    background: #fff !important;
    border-color: #111 !important;
}

.single-product .woocommerce-tabs .panel {
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    max-width: 860px !important;
}

.single-product .woocommerce-Tabs-panel,
.single-product .woocommerce-Tabs-panel p,
.single-product .woocommerce-Tabs-panel li,
.single-product .woocommerce-Tabs-panel div {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-break: break-word !important;
}

.single-product .woocommerce-Tabs-panel p {
    font-size: 17px !important;
    line-height: 1.75 !important;
    color: #222 !important;
    margin: 0 0 18px !important;
}

.single-product .woocommerce-Tabs-panel img,
.single-product .entry-summary img,
.single-product .summary img {
    max-width: 100% !important;
    height: auto !important;
}

.single-product .product *,
.single-product .summary *,
.single-product .woocommerce-tabs * {
    box-sizing: border-box !important;
}

.single-product .related,
.single-product .up-sells,
.single-product .products.columns-4,
.single-product .products.columns-3 {
    grid-column: 1 / -1 !important;
    margin-top: 36px !important;
}

/* =========================
   HEDNA — ÉDITIONS FINALES
========================= */

.single-product .hedna-editions-wrap {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 56px !important;
    padding-top: 0 !important;
    border-top: 0 !important;
    clear: both !important;
    display: block !important;
}

.single-product .hedna-editions-title {
    display: none !important;
}

.single-product .hedna-editions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 36px !important;
    width: 100% !important;
    max-width: 100% !important;
    align-items: stretch !important;
}

.single-product .hedna-edition-card {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 430px !important;
    background: #fff !important;
    border: 1px solid #e4e4e4 !important;
    padding: 32px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.single-product .hedna-edition-cover {
    display: none !important;
}

.single-product .hedna-edition-inner {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 100% !important;
    width: 100% !important;
}

.single-product .hedna-edition-kicker {
    display: none !important;
}

.single-product .hedna-edition-card h3 {
    position: relative !important;
    margin: 0 0 16px !important;
    padding-top: 58px !important;
    font-size: 32px !important;
    line-height: 1.05 !important;
    font-weight: 700 !important;
    color: #111 !important;
    max-width: 100% !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
}

.single-product .hedna-edition-paper h3::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 42px;
    height: 32px;
    border: 2px solid #111;
    border-radius: 2px;
    background:
        linear-gradient(to right,
            transparent 0,
            transparent 47%,
            #111 47%,
            #111 53%,
            transparent 53%,
            transparent 100%);
    box-sizing: border-box;
}

.single-product .hedna-edition-digital h3::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 42px;
    border: 2px solid #111;
    border-radius: 6px;
    box-sizing: border-box;
    background:
        linear-gradient(to bottom,
            transparent 0,
            transparent 84%,
            #111 84%,
            #111 86%,
            transparent 86%,
            transparent 100%);
}

.single-product .hedna-edition-price {
    margin: 0 0 22px !important;
    font-size: 30px !important;
    line-height: 1.1 !important;
    font-weight: 700 !important;
    color: #111 !important;
}

.single-product .hedna-edition-meta {
    display: grid !important;
    gap: 12px !important;
    margin: 0 0 26px !important;
    flex: 1 1 auto !important;
}

.single-product .hedna-edition-meta p {
    margin: 0 !important;
    padding: 0 0 12px !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.single-product .hedna-edition-meta span {
    display: block !important;
    margin: 0 0 4px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: #8b8b8b !important;
}

.single-product .hedna-edition-meta strong {
    display: block !important;
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    font-weight: 600 !important;
    color: #222 !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

.single-product .hedna-edition-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 190px !important;
    width: 100% !important;
    height: 46px !important;
    padding: 0 18px !important;
    margin-top: auto !important;
    align-self: stretch !important;
    border: 1px solid #111 !important;
    background: #111 !important;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    white-space: nowrap !important;
}

.single-product .hedna-edition-btn:hover {
    background: #fff !important;
    color: #111 !important;
}

/* Mobile */
@media (max-width: 900px) {
    .single-product div.product {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        padding: 0 !important;
    }

    .single-product .product_title,
    .single-product h1.product_title {
        font-size: 42px !important;
        line-height: 1.06 !important;
        margin-bottom: 4px !important;
    }

    .single-product div.product .woocommerce-product-gallery {
        max-width: 100% !important;
    }

    .single-product div.product p.price,
    .single-product div.product span.price {
        font-size: 30px !important;
    }

    .single-product form.cart {
        align-items: stretch !important;
    }

    .single-product .single_add_to_cart_button.button,
    .single-product button.single_add_to_cart_button {
        width: 100% !important;
        justify-content: center !important;
    }

    .single-product .quantity .qty {
        width: 100% !important;
    }

    .single-product .woocommerce-tabs ul.tabs {
        flex-direction: column !important;
    }

    .single-product .woocommerce-tabs ul.tabs li {
        width: 100% !important;
    }

    .single-product .hedna-editions {
        grid-template-columns: 1fr !important;
    }

    .single-product .hedna-edition-card {
        min-height: auto !important;
    }

    .single-product .hedna-edition-card h3 {
        font-size: 28px !important;
        padding-top: 54px !important;
    }
}

/* =========================
   HEDNA — ESPACE GALERIE SOUS PHOTO PRODUIT
========================= */

.single-product div.product .woocommerce-product-gallery {
    margin-bottom: 20px !important;
}

.single-product div.product .flex-control-thumbs,
.single-product div.product ol.flex-control-nav,
.single-product div.product .woocommerce-product-gallery__wrapper + .flex-control-thumbs {
    margin-top: 12px !important;
    padding-top: 0 !important;
}

/* =========================
   HEDNA — ESPACE ENTRE MINIATURES GALERIE
========================= */

.single-product div.product .flex-control-thumbs li {
    margin-right: 8px !important;
}

.single-product div.product .flex-control-thumbs li:last-child {
    margin-right: 0 !important;
}

/* =========================
   HEDNA — FINITIONS FICHE PRODUIT
========================= */

/* auteur */
.single-product .product-author {
    margin: 0 0 18px;
    font-size: 17px;
    line-height: 1.5;
    color: #444;
}

.single-product .product-author a {
    color: #111;
    text-decoration: none;
    font-weight: 600;
}

.single-product .product-author a:hover {
    text-decoration: underline;
}

/* galerie */
.single-product div.product .woocommerce-product-gallery {
    margin-bottom: 22px;
}

.single-product div.product .flex-control-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    padding-top: 0;
}

.single-product div.product .flex-control-thumbs li {
    margin: 0;
    float: none;
}

/* =========================
   HEDNA — BOUTON EXTRAIT + CITATION
========================= */

.hedna-product-extrait {
    margin-top: 20px;
}

.hedna-product-extrait__button,
.hedna-product-extrait-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid #111;
    background: #111;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
}

.hedna-product-extrait__button:hover,
.hedna-product-extrait-btn:hover {
    background: #fff;
    color: #111;
}

.hedna-product-extrait__quote,
.hedna-extrait-court {
    margin-top: 28px;
    max-width: 460px;
}

.hedna-product-extrait__text p,
.hedna-extrait-court p {
    margin: 0;
}

.hedna-product-extrait__author,
.hedna-extrait-court cite {
    display: block;
    margin-top: 12px;
    font-size: 14px;
    color: #777;
}

/* =========================
   HEDNA — MODAL PDF
========================= */

.hedna-pdf-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
}

.hedna-pdf-modal.is-open {
    display: block;
}

.hedna-pdf-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.hedna-pdf-modal__dialog {
    position: relative;
    width: min(1100px, 92vw);
    height: min(88vh, 900px);
    margin: 4vh auto 0;
    background: #fff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.hedna-pdf-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 0;
    background: #111;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.hedna-pdf-modal__viewer {
    width: 100%;
    height: 100%;
}

.hedna-pdf-modal__viewer iframe,
#hednaPdfFrame {
    width: 100%;
    height: 100%;
    border: 0;
}

body.hedna-pdf-open {
    overflow: hidden;
}

/* mobile */
@media (max-width: 768px) {
    .hedna-pdf-modal__dialog {
        width: 96vw;
        height: 90vh;
        margin-top: 2vh;
    }

    .hedna-pdf-modal__close {
        top: 8px;
        right: 8px;
    }
}