/**
Theme Name: Domaine Joliet
Author: Agence Brume
Description: Thème de la boutique du Domaine Joliet.
 */

/* Accès boutique et informations de livraison. */
.dj-tasting-hero .image-link-content { display:flex; flex-direction:column; align-items:center; gap:clamp(24px,2.5vw,38px); max-width:100%; box-sizing:border-box; }
.dj-tasting-hero .image-link-content .image-title { margin:0; line-height:1.06; text-align:center; }
.dj-tasting-hero .dj-home-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; width:min(350px,100%); }
.dj-tasting-hero .dj-home-actions > a { display:flex; min-width:0; }
.dj-tasting-hero .dj-home-actions > a .image-button { display:flex; align-items:center; justify-content:center; box-sizing:border-box; width:100%; height:auto; min-height:54px; padding:10px 15px; margin:0; white-space:nowrap; }
.dj-tasting-hero .dj-home-actions > a:focus-visible { outline:2px solid white; outline-offset:4px; }
#Product .product-image[hidden] { display:none; }
#Product .dj-shipping-note, #dj-cart-preview .dj-shipping-note { font:normal 16px/1.4 Garamond,serif; margin:16px 0; }
.dj-shipping-note strong { display:block; }
.dj-shipping-note a, footer .mentions .block-title a { color:inherit; text-underline-offset:3px; }
.dj-shipping-note a { text-decoration:underline; }
#dj-delivery-area:not([hidden]) { color:#713126; padding:8px 12px; border-left:3px solid currentColor; font-size:15px; line-height:1.4; }
#ProductsFilters .dj-filter-panel summary { cursor:pointer; }
#cuvees, #identite-du-vendeur, #livraison-des-vins { scroll-margin-top:110px; }
@media (max-width:767px) {
    .dj-tasting-hero .image-link-content { width:min(100%,360px); padding:0 16px; gap:24px; }
    .dj-tasting-hero .dj-home-actions { width:min(290px,100%); gap:10px; }
    .dj-tasting-hero .dj-home-actions > a .image-button { min-height:48px; padding:8px 10px; }
    body #Product { margin:72px auto 0; width:100%; }
    body #Product > .product-image { height:auto; margin:0 0 12px; }
    body #Product > .product-image img { width:auto; max-width:100%; height:clamp(140px,22vh,190px); object-fit:contain; }
    #Product .product-infos .product-name { font-size:clamp(29px,8vw,38px); line-height:1.08; }
    #Product .product-infos .product-price { margin:8px 0; line-height:1.25; }
    #Product .product-infos .product-set-quantity { margin:10px 0 0; padding-bottom:6px; }
    #Product .product-infos .product-add-to-cart { margin:12px 0 0; }
    #Product .product-infos .product-add-to-cart button { width:100%; min-height:48px; height:auto; justify-content:center; margin:0; padding:8px 18px; }
    #Product .product-infos .product-description { margin-top:18px; }
    body #Product .product-infos p.dj-shipping-note { padding:0; }
    .post-wrapper:has(> #cuvees) { margin:72px auto 0; }
    .post-wrapper:has(> #cuvees) > h1 { margin:0 auto 8px; padding:0 20px; font-size:36px; line-height:1.1; }
    .post-wrapper:has(> #cuvees) > h2 { margin:0 auto 8px; padding:0 22px; font-size:19px; line-height:1.25; text-align:center; }
    .post-wrapper:has(> #cuvees) > .wp-block-buttons { margin:0 auto 8px; padding:0 18px; justify-content:center; }
    .post-wrapper:has(> #cuvees) > .wp-block-buttons a { margin:0; min-height:44px; height:auto; padding:5px 14px; }
    .post-wrapper #ProductsFilters { position:static; width:auto; height:auto; margin:8px 20px; }
    #ProductsFilters .dj-filter-panel summary { min-height:40px; line-height:40px; margin:0; padding:0; font-size:20px; }
    #ProductsFilters .dj-filter-panel:not([open]) > #AllFilters { display:none; }
    #cuvees.product-slider { margin:0 auto 32px; padding:8px 0 20px; }
    #cuvees .products { margin-top:0; }
    #cuvees .wc-block-components-product-image, #cuvees .wc-block-components-product-image a, #cuvees .wc-block-components-product-image img { height:clamp(145px,22vh,190px); }
    #cuvees .wc-block-components-product-image img { object-fit:contain!important; }
    #cuvees .swiper-slide:has(.woocommerce-placeholder) .wc-block-components-product-image { display:none; }
    #cuvees .swiper-slide:has(.woocommerce-placeholder) { justify-content:center; }
}

#ProductsFilters .dj-filter-choice { display:flex; align-items:center; gap:9px; width:max-content; max-width:100%; min-height:32px; margin:0; cursor:pointer; }
#ProductsFilters .dj-filter-choice input { appearance:auto; position:static; width:16px; height:16px; margin:0; opacity:1; accent-color:#33292c; cursor:pointer; }
#ProductsFilters .dj-filter-result { font-size:15px; line-height:1.3; }
#ProductsFilters .dj-filter-result span:not(:empty) { display:block; margin-top:8px; }
#ProductsFilters .dj-filter-result button { font:inherit; color:inherit; background:transparent; border:0; text-decoration:underline; cursor:pointer; padding:6px 0; }
#ProductsFilters .dj-filter-result button[hidden] { display:none; }
#Product .product-infos .dj-wine-details { font-size:16px; line-height:1.3; margin:7px 0 4px; }

/* Fiches des cuvées vendues à la bouteille. */
.dj-product-page {
    --dj-ink: #292329;
    --dj-muted: #5a5357;
    --dj-rule: #c8c2be;
    --dj-gap: clamp(36px, 5vw, 84px);
    width: min(1120px, calc(100% - 96px));
    margin: clamp(110px, 8vw, 130px) auto clamp(56px, 7vw, 96px);
    color: var(--dj-ink);
    font-family: Garamond, serif;
}
body .dj-product-page #Product.dj-wine-product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "photo heading" "photo purchase";
    grid-template-rows: max-content 1fr;
    align-items: start;
    gap: 0 var(--dj-gap);
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}
.dj-product-page *, .dj-product-page *::before, .dj-product-page *::after { box-sizing: border-box; }
.dj-product-page .dj-wine-heading { grid-area: heading; padding-top: clamp(12px, 2.4vw, 36px); }
.dj-product-page .dj-wine-heading h1,
.dj-product-page .dj-wine-story h2 {
    width: 100% !important; margin: 0; padding: 0; color: var(--dj-ink); text-align: left;
    font: normal clamp(38px, 3.25vw, 52px)/1.04 Garamond, serif;
    text-transform: none; letter-spacing: -.025em; text-wrap: balance;
}
.dj-product-page .dj-wine-heading .dj-vintage {
    margin: 12px 0 0; padding: 0; color: var(--dj-muted); text-align: left;
    font: normal 18px/1.3 Garamond, serif;
}
.dj-product-page .dj-wine-photo {
    grid-area: photo; margin: 0; padding: 24px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    height: clamp(370px, 31vw, 460px); width: 100%; background: #eae8e5;
}
.dj-product-page .dj-wine-photo img {
    display: block; flex: 1 1 0; min-height: 0; width: 100%; height: 100%;
    margin: 0; object-fit: contain; mix-blend-mode: multiply;
}
.dj-product-page .dj-wine-photo figcaption {
    flex: none; color: var(--dj-muted); font: normal 15px/1.2 Garamond, serif; text-align: center;
}
.dj-product-page .dj-wine-purchase { grid-area: purchase; min-width: 0; padding: 0; }
.dj-product-page .dj-wine-purchase .dj-wine-price {
    display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px;
    margin: 22px 0; padding: 0; text-align: left;
    color: var(--dj-ink); font: normal 32px/1.1 Garamond, serif;
}
.dj-product-page .dj-wine-price small { font: normal 16px/1.3 Garamond, serif; color: var(--dj-muted); }
.dj-product-page .dj-wine-purchase form { display: block; margin: 0; padding: 0; }
.dj-product-page .dj-wine-purchase label { display: block; margin: 0 0 6px; font: normal 17px/1.2 Garamond, serif; }
#Product.dj-wine-product .dj-wine-actions { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; }
#Product.dj-wine-product .dj-wine-actions :is(select, button) {
    position: static; display: block; width: 100%; min-width: 0; height: 50px; margin: 0;
    border: 1px solid var(--dj-ink); border-radius: 0; opacity: 1; cursor: pointer;
    font: normal 19px/1.2 Garamond, serif; text-transform: none; letter-spacing: 0;
}
#Product.dj-wine-product .dj-wine-actions select { appearance: auto; padding: 0 10px; color: var(--dj-ink); background: transparent; }
#Product.dj-wine-product .dj-wine-actions button { padding: 0 12px; background: var(--dj-ink); color: white; text-align: center; }
#Product.dj-wine-product .dj-wine-actions button:hover { background: #443a41; }
.dj-product-page :is(a, select, button):focus-visible { outline: 2px solid #326378; outline-offset: 3px; }
body .dj-product-page #Product .dj-wine-purchase .dj-shipping-note {
    margin: 20px 0 0; padding: 15px 0 0; border-top: 1px solid var(--dj-rule);
    color: var(--dj-muted); font: normal 17px/1.4 Garamond, serif; text-align: left;
}
.dj-product-page .dj-shipping-note strong { color: var(--dj-ink); }
.dj-product-page .dj-wine-story {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--dj-gap);
    align-items: start; margin: clamp(32px, 4vw, 60px) 0 0; padding: clamp(24px, 3vw, 44px) 0 0;
    border-top: 1px solid var(--dj-rule);
}
.dj-product-page .dj-wine-story h2 { font-size: clamp(32px, 3vw, 42px); }
.dj-product-page .dj-wine-story p, .dj-product-page .dj-wine-article > p {
    margin: 0; padding: 0; color: var(--dj-ink); text-align: left;
    font: normal 20px/1.5 Garamond, serif; letter-spacing: normal;
}
.dj-product-page .dj-wine-story p + p { margin-top: 10px; }
.dj-product-page .dj-wine-sheet {
    display: inline-block; padding: 9px 0; margin-top: 8px; color: var(--dj-ink);
    font: normal 17px/1.4 Garamond, serif; text-decoration: underline; text-underline-offset: 4px;
}
.dj-product-page .post-wrapper.dj-wine-article { width: 100%; max-width: none; margin: clamp(36px, 5vw, 72px) auto 0; padding: clamp(24px, 3vw, 44px) 0 0; border-top: 1px solid var(--dj-rule); }
.dj-product-page .dj-wine-article > :is(h2,h3,p) { width: min(100%, 740px) !important; height: auto; margin-left: auto; margin-right: auto; padding: 0; }
.dj-product-page .dj-wine-article > h2 { font: normal clamp(26px, 2.5vw, 38px)/1.15 Garamond, serif; text-align: left; margin-top: 0; margin-bottom: 12px; text-wrap: balance; }
.dj-product-page .dj-wine-article > h2 + h2 { color: var(--dj-muted); font-size: 21px; line-height: 1.4; }
.dj-product-page .dj-wine-article > h3 { font: normal clamp(24px, 2vw, 30px)/1.2 Garamond, serif; text-align: left; margin-top: 32px; margin-bottom: 8px; }
.dj-product-page .dj-wine-article > p { margin: 8px auto; }
.dj-product-page .dj-wine-article > p:empty { display: none; }
.dj-product-page .dj-wine-article > .post-image { width: min(100%, 880px); height: clamp(180px, 32vw, 360px); margin: 28px auto; background-size: cover; background-position: center; }
body .dj-product-page #Product.dj-wine-product--text { max-width: 680px; margin: 0 auto; grid-template-columns: 1fr; grid-template-areas: "heading" "purchase"; }
.dj-product-page .dj-wine-product--text .dj-wine-heading { padding-top: 0; }
.dj-product-page:has(.dj-wine-product--text) .dj-wine-story { max-width: 680px; margin-left: auto; margin-right: auto; grid-template-columns: 1fr; gap: 16px; }
@media (max-width: 759px) {
    .dj-product-page { width: calc(100% - 40px); margin: 76px auto 48px; }
    body .dj-product-page #Product.dj-wine-product { grid-template-columns: minmax(0, 1fr); grid-template-areas: "heading" "photo" "purchase"; grid-template-rows: auto; }
    .dj-product-page .dj-wine-heading { padding: 0; }
    .dj-product-page .dj-wine-heading h1 { font-size: clamp(29px, 7.2vw, 39px); line-height: 1.06; }
    .dj-product-page .dj-wine-heading .dj-vintage { margin-top: 5px; font-size: 16px; }
    .dj-product-page .dj-wine-photo { height: clamp(155px, 23vh, 214px); margin-top: 14px; padding: 10px; gap: 3px; }
    .dj-product-page .dj-wine-photo figcaption { font-size: 13px; }
    .dj-product-page .dj-wine-purchase .dj-wine-price { margin: 14px 0; font-size: 29px; }
    #Product.dj-wine-product .dj-wine-actions { grid-template-columns: 72px minmax(0, 1fr); gap: 8px; }
    #Product.dj-wine-product .dj-wine-actions :is(select, button) { height: 48px; }
    body .dj-product-page #Product .dj-wine-purchase .dj-shipping-note { margin-top: 16px; padding-top: 12px; font-size: 16px; }
    .dj-product-page .dj-wine-story { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; padding-top: 22px; }
    .dj-product-page .dj-wine-story p, .dj-product-page .dj-wine-article > p { font-size: 18px; }
    body .dj-product-page #Product.dj-wine-product--text { grid-template-areas: "heading" "purchase"; }
}

.dj-tasting-hero h1.image-title { margin: 0; padding: 0; font-weight: 400; }

/* Quantité des fiches de vente : pas de 1 et saisie au clavier. */
#Product.dj-wine-product .dj-stepper-actions {
    grid-template-columns: 134px minmax(0, 1fr);
    align-items: stretch;
}
#Product.dj-wine-product .dj-quantity-stepper {
    display: flex; align-items: stretch; box-sizing: border-box;
    height: 50px; border: 1px solid var(--dj-ink); color: var(--dj-ink);
}
#Product.dj-wine-product .dj-quantity-stepper :is(input, button) {
    appearance: none; position: static; display: block;
    flex: 1 1 0; min-width: 0; width: 100%; height: 100%; margin: 0; padding: 0;
    border: 0; border-radius: 0; background: transparent; color: inherit; text-align: center;
    font: normal 22px/1 Garamond, serif; letter-spacing: normal; font-variant-numeric: lining-nums tabular-nums;
}
#Product.dj-wine-product .dj-quantity-stepper input { appearance: textfield; }
#Product.dj-wine-product .dj-quantity-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
#Product.dj-wine-product .dj-quantity-stepper button[hidden] { display: none; }
#Product.dj-wine-product .dj-quantity-stepper button:enabled:hover { background: #dedade; }
#Product.dj-wine-product .dj-quantity-stepper button:disabled { opacity: .4; cursor: default; }
#Product.dj-wine-product .dj-quantity-stepper :is(input,button):focus-visible { outline: 2px solid #326378; outline-offset: -3px; }
#Product.dj-wine-product .dj-submit-slot { min-width: 0; margin: 0; padding: 0; border: 0; }
#Product.dj-wine-product .dj-submit-slot:disabled button { opacity: .55; cursor: default; }
@media (max-width: 759px) {
    #Product.dj-wine-product .dj-quantity-stepper { height: 48px; }
}
@media (max-width: 359px) {
    #Product.dj-wine-product .dj-stepper-actions { grid-template-columns: minmax(0, 1fr); }
    #Product.dj-wine-product .dj-quantity-stepper { width: 134px; }
}

/* Échelle typographique du site public. Les rôles éditoriaux et marchands sont distincts. */
body.main-container {
    --dj-display: 3.125rem;
    --dj-page-title: 3.125rem;
    --dj-section: 1.875rem;
    --dj-intro: 1.625rem;
    --dj-copy: 1.0625rem;
    --dj-detail: .9375rem;
    --dj-caption: .8125rem;
    --dj-action: .875rem;
    --dj-buy: .8125rem;
    --dj-menu-link: 1.5625rem;
    --dj-product-title: 2.875rem;
    --dj-product-price: 1.5625rem;
    --dj-card-title: 1.6875rem;
    --dj-card-price: 1.125rem;
    --dj-card-detail: 1.0625rem;
    --dj-legal: .8125rem;
}
@media (min-width: 768px) and (max-width: 991px) {
    body.main-container {
        --dj-section: 1.625rem; --dj-intro: 1rem; --dj-product-title: 2rem;
        --dj-menu-link: 1.1875rem;
    }
}
@media (max-width: 767px) {
    body.main-container {
        --dj-display: 1.875rem; --dj-page-title: 1.6875rem; --dj-section: 1.3125rem;
        --dj-intro: 1.125rem; --dj-copy: .875rem; --dj-detail: .8125rem;
        --dj-caption: .6875rem; --dj-action: .6875rem; --dj-buy: .6875rem;
        --dj-menu-link: 1.1875rem; --dj-product-title: 1.3125rem; --dj-product-price: 1rem;
        --dj-card-title: 1.0625rem; --dj-card-price: .8125rem; --dj-card-detail: .75rem; --dj-legal: .75rem;
    }
}

/* Navigation et accueil. */
body.main-container > nav,
body.main-container > nav .desktop-only > .item,
body.main-container > nav .desktop-only > .device-menu-item,
body.main-container > nav .pll-switcher-select { font-size: var(--dj-action); }
body.main-container nav .menu-category-title,
body.main-container nav .menu-category-title a { font-size: var(--dj-menu-link); line-height: 1.12; }
body.main-container nav .menu-category-row,
body.main-container nav .menu-category-row a { font-size: var(--dj-detail); line-height: 1.35; }
body.main-container #DeviceMenu .device-menu-item.has-submenu,
body.main-container #DeviceSubmenuContainer .submenu-item-container .device-menu-item,
body.main-container #DeviceSubmenuContainer .header-name { font-size: var(--dj-menu-link); line-height: 1.2; }
body.main-container #DeviceMenu .device-menu-item:is(.address,.title) { font-size: var(--dj-detail); }
body.main-container #MobileTotalCartItems { font-size: var(--dj-action); }
body.main-container .image-link .image-title,
body.main-container .product-slider .product-slider-title { font-size: var(--dj-display); line-height: 1.1; }
body.main-container .image-link .image-button,
body.main-container #NewsletterForm button,
body.main-container .wp-block-buttons .wp-block-button__link { font-size: var(--dj-action); line-height: 1.25; }

/* Pages du domaine, blog et catalogue. */
body.main-container .post-wrapper:has(> #cuvees) > h1.wp-block-heading,
body.main-container :is(.post-wrapper,.woocommerce-account,.basket-wrapper) h1.wp-block-heading { font-size: var(--dj-page-title); line-height: 1.12; }
body.main-container .post-wrapper h2.wp-block-heading,
body.main-container .post-wrapper h3.wp-block-heading,
body.main-container .wp-block-query .wp-block-post-title { font-size: var(--dj-section); line-height: 1.18; }
body.main-container .post-wrapper:has(> #cuvees) > h1 + h2.wp-block-heading,
body.main-container .post-wrapper > h1 + h2.wp-block-heading { font-size: var(--dj-intro); line-height: 1.38; }
body.main-container .post-wrapper .wp-block-paragraph,
body.main-container .post-wrapper :is(ul,ol).wp-block-list,
body.main-container .wp-block-query .wp-block-post-excerpt__excerpt { font-size: var(--dj-copy); line-height: 1.48; }
body.main-container .wp-block-query .wp-block-post-excerpt__more-link { font-size: var(--dj-caption); line-height: 1.45; }
body.main-container .product-slider .product-name,
body.main-container .product-slider .product-name > a { font-size: var(--dj-card-title); line-height: 1.15; }
body.main-container .product-slider .small-description { font-size: var(--dj-card-detail); line-height: 1.35; }
body.main-container .product-slider .product-price { font-size: var(--dj-card-price); line-height: 1.35; }
body.main-container #ProductsFilters .dj-filter-panel summary,
body.main-container #ProductsFilters .filter-name { font-size: var(--dj-copy); }
body.main-container #ProductsFilters :is(.dj-filter-choice,.dj-filter-result) { font-size: var(--dj-detail); }

/* Fiches de vente et panier. La surface des commandes tactiles reste indépendante du texte. */
body.main-container .dj-product-page .dj-wine-heading h1 { font-size: var(--dj-product-title); line-height: 1.12; }
body.main-container .dj-product-page .dj-wine-heading .dj-vintage,
body.main-container .dj-product-page .dj-wine-photo figcaption { font-size: var(--dj-caption); }
body.main-container .dj-wine-purchase .dj-wine-price { font-size: var(--dj-product-price); line-height: 1.2; }
body.main-container .dj-product-page .dj-wine-price small,
body.main-container .dj-product-page .dj-wine-purchase label { font-size: var(--dj-detail); }
body.main-container #Product.dj-wine-product .dj-submit-slot button,
body.main-container #BasketSummaryWindow button,
body.main-container #dj-cart-preview .dj-cart-checkout,
body.main-container .wc-block-checkout .wc-block-components-checkout-place-order-button { font-size: var(--dj-buy); }
body.main-container #Product.dj-wine-product .dj-quantity-stepper input { font-size: 1.0625rem; }
body.main-container .dj-product-page #Product .dj-wine-purchase .dj-shipping-note,
body.main-container #dj-cart-preview .dj-shipping-note { font-size: var(--dj-detail); line-height: 1.45; }
body.main-container .dj-product-page .dj-wine-story h2,
body.main-container .dj-product-page .dj-wine-article > :is(h2,h3) { font-size: var(--dj-section); line-height: 1.18; }
body.main-container .dj-product-page .dj-wine-article > h2 + h2 { font-size: var(--dj-intro); line-height: 1.38; }
body.main-container .dj-product-page .dj-wine-story p,
body.main-container .dj-product-page .dj-wine-article > p { font-size: var(--dj-copy); line-height: 1.48; }
body.main-container .dj-product-page .dj-wine-sheet { font-size: var(--dj-caption); }
body.main-container #BasketContainer .product-name,
body.main-container #BasketContainer .product-total { font-size: var(--dj-card-title); }
body.main-container #BasketContainer .product-set-quantity,
body.main-container #BasketSummaryWindow .row .col,
body.main-container #dj-cart-preview,
body.main-container #dj-cart-preview p,
body.main-container #dj-cart-preview .dj-cart-subtotal { font-size: var(--dj-copy); }
body.main-container #BasketSummaryWindow .row.total .col { font-size: var(--dj-product-price); }
body.main-container #BasketSummaryWindow .title,
body.main-container #dj-cart-preview h2,
body.main-container .wc-block-checkout .wc-block-components-checkout-step__title { font-size: var(--dj-section); line-height: 1.2; }
body.main-container #dj-cart-preview .dj-cart-lines small,
body.main-container #dj-cart-preview .dj-cart-clear,
body.main-container #dj-cart-preview .dj-clear-confirm button { font-size: var(--dj-detail); }

/* Informations pratiques et pied de page. */
body.main-container #joliet-closure-notice,
body.main-container footer .footer-block .block-description { font-size: var(--dj-detail); line-height: 1.45; }
body.main-container #NewsletterContainer .title { font-size: var(--dj-section); line-height: 1.2; }
body.main-container footer .footer-block .block-title { font-size: var(--dj-copy); line-height: 1.3; }
body.main-container footer .mentions a,
body.main-container footer .footer-message { font-size: var(--dj-legal); line-height: 1.45; }
