/*
Theme Name: ELGE
Theme URI: https://www.elge-protection.com
Author: Les Imageurs
Author URI: https://imageurs.com
Description: Un thème sur-mesure WordPress moderne utilisant le Full Site Editing (FSE) pour le site serpollet.elge-protection.com.
Version: 1.0.0
Requires at least: 6.9.4
Tested up to: 6.9.4
Requires PHP: 8.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elge
Tags: block-patterns, block-styles, custom-colors, custom-background, custom-header, custom-logo, featured-image-header, editor-style, full-site-editing, one-column, template-editing, wide-blocks, accessibility-ready, 
*/

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
    scroll-behavior: smooth;
    font-family: var(--dm-sans);
}

/* --- Layout --- */
body {
    width: 100%;
    overflow-x: hidden !important;
    background-color: var(--grey);
    color: var(--blue-dark);
}

main {
    padding: 88px 0;
}

.is-layout-grid {
    display: grid;
}

.is-layout-flex {
    display: flex;
}

.wp-site-blocks {
    width: 100dvw;
    max-width: 100%;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 0 24px;
}

.alignfull {
    padding: 0 24px;
}

.alignwide:not(.wp-block-cover)>* {
    width: 100dvw;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.alignwide .wp-block-cover__inner-container {
    width: 100dvw;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.alignfull:not(.wp-block-image),
.alignwide:not(.wp-block-image) {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.wp-block-image.alignfull,
.wp-block-image.alignwide {
    width: 100%;
}

@media (max-width: 782px) {

    .wp-site-blocks,
    .alignwide .wp-block-cover__inner-container,
    .alignwide:not(.wp-block-cover)>*,
    .alignfull {
        padding: 0 16px;
    }
}

/* --- Header --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2;
}

.header-container {
    height: 64px;
    padding-top: 10px;
    padding-bottom: 10px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.custom-logo {
    height: 50px !important;
}

.page-header__title {
    gap: 24px;
}

.page-title {
    font-weight: 500;
    letter-spacing: 0.04rem;
}

@media (width < 1200px) {
    .page-title {
        display: none;
    }
}

/* --- Styles --- */
h1 {
    padding-left: 1rem;
    text-transform: uppercase;
    border-left: 1px solid var(--white);
}

a {
    text-decoration: none;
}

.wp-block-columns {
    gap: 24px;
}

.wp-block-separator.has-background:not(.is-style-dots) {
    margin: 12px 0;
    height: 0.5px;
}

/* --- Boutons --- */
.wc-block-components-button:not(.is-link) {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 6px;
    padding-top: 8px;
    padding-right: 16px;
    padding-bottom: 8px;
    padding-left: 16px;
    min-height: 44px;
    color: var(--white);
    background-color: var(--blue);
}

.wp-block-button__link,
.wc-block-components-button:not(.is-link) {
    border: none;
    transition: all 0.3s;
}

.wp-block-button__link:hover,
.wc-block-components-button:not(.is-link):hover {
    background: var(--blue-mid);
    transform: translateY(-1px);
}



/* --- Catalogue (page boutique) --- */
@media (max-width < 1200px) {
    .catalogue-container.is-layout-flex {
        flex-direction: column;
    }
}

@media (min-width: 1200px) {
    .catalogue-container.is-layout-flex {
        display: grid;
        grid-template-columns: 290px 1fr;
        gap: 24px;
        align-items: start;
    }

    .catalogue-container .products-filters {
        position: sticky;
        top: 88px;
        width: 290px;
        height: fit-content;
    }

    .catalogue-container .products-list {
        grid-column: 2;
        width: 100%;
    }
}

/* --- Mini panier --- */
.wc-block-components-drawer__screen-overlay {
    backdrop-filter: blur(2px);
    background-color: rgba(0, 10, 20, 0.55);
}

.wc-block-mini-cart__button {
    background-color: var(--blue);
    border-radius: 6px;
    padding: 8px 16px;
    margin-left: 16px;
    transition: background 0.18s, transform 0.15s;
}

.wc-block-mini-cart__button:hover {
    background: var(--blue-mid);
    transform: translateY(-1px);
}

.wc-block-mini-cart__quantity-badge {
    gap: 8px;
}

.wc-block-mini-cart__button .wc-block-mini-cart__icon {
    height: 25px;
    width: 25px;
}

.mini-cart__label {
    content: "Panier";
    color: var(--white);
    vertical-align: middle;
}

@media (width < 1200px) {
    .mini-cart__label {
        display: none;
    }
}

.wc-block-mini-cart__badge {
    position: relative;
    margin: 0;
    left: unset;
    transform: none;
    border-radius: 50%;
    font-weight: 500;
    width: 24px;
    height: 24px;
    line-height: 1;
    background-color: var(--white);
    color: var(--blue);
}

/* --- Filtres produits --- */
.products-filters.wp-block-column {
    border-radius: 10px;
    height: fit-content;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0, 30, 56, 0.09);
}

.products-filters__header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-radius: 10px 10px 0 0;
    padding: 16px;
    background-color: var(--blue-dark);
}

.products-filters__header span {
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.products-filters__reset {
    font-size: 0.875rem;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s;
}

.products-filters__reset:hover {
    color: var(--white);
}

.products-filters__body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    border-radius: 0 0 10px 10px;
    background-color: var(--white);
}

.products-filters__search {
    padding: 8px 16px;
    border-radius: 4px;
    color: var(--blue-dark);
    background-color: var(--grey);
    border: 1px solid var(--border);
    height: 41px;
    font-size: 1rem;
    outline: none;
    transition: border 0.3s;
}

.products-filters__search:focus {
    border: 1px solid var(--blue-mid);
}

.products-filters__group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.products-filters__group-label {
    text-transform: uppercase;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--grey-mid);
}

.products-filters__row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    cursor: pointer;
    border-radius: 6px;
    padding: 4px 8px;
    margin: 0 !important;
    transition: all 0.3s;
}

.products-filters__row:hover {
    background-color: var(--blue-light);
}

.products-filters__label {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: flex-start;
    cursor: pointer;
}

.products-filters__row input {
    width: 16px;
    height: 16px;
    flex-grow: 0;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--blue-mid);
}

.products-filters__count {
    font-weight: 600;
    color: var(--grey-mid);
    font-size: 0.875rem;
    flex-grow: 0;
    flex-shrink: 0;
    margin-top: 2px;
}

/* --- Boucle produits --- */
.products-list {
    gap: 24px;
}

.products-list .product {
    border: 1.5px solid var(--border);
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 30, 56, 0.09);
    transition: border-color 0.3s, box-shadow 0.3s, border 0.3s;
}

.products-list .product:hover,
.products-list .product.active {
    border-color: var(--blue-mid);
    box-shadow: 0 8px 32px rgba(0, 30, 56, 0.16);
}


.products-list .wc-block-components-product-image {
    border: 1px solid var(--border);
    border-radius: 8px;
    flex-shrink: 0;
}

.products-list .wc-block-components-product-sku {
    width: fit-content;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.products-list .wp-block-post-terms__prefix {
    display: none;
}

.products-list .product-card__informations-container {
    cursor: pointer;
    padding: 20px;
    justify-content: space-between;
}

@media (width < 1200px) {
    .products-list .product-card__informations-container {
        flex-wrap: wrap;
        gap: 16px;
    }

    .product-card__actions {
        flex-direction: row;
        justify-content: flex-end;
        width: 100%;
    }
}

.products-list .product-card__informations {
    align-items: center;
    gap: 24px;
}

@media (width < 600px) {
    .products-list .product-card__informations {
        flex-wrap: wrap;
    }
}

.products-list .product-card__content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.products-list .taxonomy-product_cat {
    text-transform: uppercase;
    font-weight: 600;
}

.products-list .wc-block-components-product-summary {
    margin: 0;
}

.products-list .amount {
    font-weight: 700;
}

.product-card__actions {
    gap: 8px;
    flex-shrink: 0;
}

.product-button__close .wp-block-button__link {
    border: 1px solid var(--border);
    background-color: var(--grey);
    font-weight: 500;
    height: 33px;
    width: 34px;
    min-height: unset;
    border-radius: 6px;
    padding: 6px 12px;
    transition: color 0.3s, border 0.3s, background 0.3s;
}

.product-button__close .wp-block-button__link:hover,
.product-button__close.active .wp-block-button__link {
    color: var(--blue-mid);
    border: 1px solid var(--blue-mid);
    background-color: var(--blue-light);
    transform: none;
}

.product-button__close .wp-block-button__link span {
    transform-origin: center;
    display: inline-block;
    transition: transform 0.3s;
}

.product-button__close.active .wp-block-button__link span {
    transform: rotate(45deg);
}

.products-list .product-button__details {
    position: relative;
    border: 1px solid var(--border);
    font-weight: 500;
    border-radius: 6px;
    padding: 6px 12px;
    transition: color 0.3s, border 0.3s, background 0.3s;
}

.products-list .product-button__details::before {
    content: "";
    display: inline-block;
    width: 13px;
    height: 13px;
    vertical-align: middle;
    margin-right: 4px;
    background-color: var(--grey-mid);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='m21 21-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.products-list .product-button__details:hover::before {
    background-color: var(--blue-mid);
}

.products-list .product-button__details:hover {
    color: var(--blue-mid) !important;
    border: 1px solid var(--blue-mid);
    background-color: var(--blue-light);
}

.product-variations__mobile {
    display: none;
}

.product-variations__desktop {
    display: block;
}

@media (max-width: 1199px) {
    .product-variations__desktop {
        display: none;
    }

    .product-variations__mobile {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
}

.product-variations__container {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 20px;
    flex-direction: column;
    gap: 12px;
    border-top: 0px solid var(--border);
    background-color: #fafafa;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.3s ease,
        padding 0.3s ease,
        border-top-width 0.3s ease;
}

.product.active .product-variations__container {
    max-height: fit-content;
    opacity: 1;
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
}

.product-variations__header,
.product-variations__row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.product-variations__header {
    background: var(--grey);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.product-variations__list {
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.product-variations__list-header,
.product-variations__list-row {
    display: flex;
    flex-direction: row;
}

.product-variations__list-header>div,
.product-variations__list-row>div {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.price-header,
.qty-header {
    justify-content: center;
}

.price-cell,
.qty-cell {
    justify-content: center;
}

.product-variations__list-header>div:not(:last-child),
.product-variations__list-row>div:not(:last-child) {
    border-right: 1px solid var(--border);
}

.product-variations__list-header {
    text-align: center;
    background: var(--grey);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.product-variations__list-row {
    background-color: var(--white);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

.product-variations__list-row:hover {
    background-color: var(--grey);
}

.product-variations__list-header>div,
.product-variations__list-row>div {
    padding: 12px 16px;
}

.product-variations__list-row>div:not(:last-child) {
    border-right: 1px solid var(--border);
}

.product-variations__list-row:last-child {
    border-bottom: none;
}

.product-variations__list-header>div:nth-child(1),
.product-variations__list-row>div:nth-child(1) {
    flex: 1;
}

.product-variations__list-header>div:nth-child(2),
.product-variations__list-row>div:nth-child(2) {
    width: 100px;
    text-align: center;
}

.product-variations__list-header>div:nth-child(3),
.product-variations__list-row>div:nth-child(3) {
    width: 180px;
}

.product-variations__footer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

@media (width < 1200px) {
    .product-variations__footer {
        justify-content: center;
    }
}

.add-to-cart-btn {
    width: fit-content;
    margin-left: 16px;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}

.add-to-cart-btn:not(:disabled):hover {
    background: var(--blue);
}

/* Version 2D - Grid Layout */
.product-variations__desktop {
    overflow-x: scroll;
    scrollbar-width: thin;
    scrollbar-color: #ccc #fafafa;
    padding-bottom: 4px;
}

.product-variations__grid-container {
    overflow-x: visible;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
}

.product-variations__grid {
    display: grid;
    background: var(--grey);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.product-variations__desktop::-webkit-scrollbar {
    height: 8px;
}

.product-variations__desktop::-webkit-scrollbar-track {
    background: #fafafa;
    border-radius: 4px;
}

.product-variations__desktop::-webkit-scrollbar {
    height: 8px;
}

.product-variations__desktop::-webkit-scrollbar-button {
    display: none;
}

.product-variations__desktop::-webkit-scrollbar-track {
    background: #fafafa;
}

.product-variations__desktop::-webkit-scrollbar-thumb {
    background: var(--grey);
    border-radius: 4px;
}

.product-variations__desktop::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.product-variations__grid-header {
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    background: var(--grey);
}

.product-variations__grid-row {
    background-color: var(--white);
    transition: background 0.3s;
}

.product-variations__grid-row:hover {
    background-color: var(--grey);
}

.product-variations__grid-row>div:first-child {
    text-align: center;
}

.product-variations__grid>.product-variations__grid-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.product-variations__grid-header,
.product-variations__grid-row {
    display: grid;
    grid-template-columns: 156px repeat(calc(var(--grid-columns) - 1), minmax(156px, 1fr));
}

.product-variations__grid-header>div,
.product-variations__grid-row>div {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}

.product-variations__grid-header>div:not(:last-child),
.product-variations__grid-row>div:not(:last-child) {
    border-right: 1px solid var(--border);
}

.corner-label {
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
}

.grid-header-cell {
    font-size: 0.875rem;
    font-weight: 600;
}


.attribut-label {
    font-size: 0.875rem;
}

.attribut-label,
.product-variations__card-qty-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.product-variations__card-qty-label {
    font-size: .875rem;
}

.product-variations__card-price {
    flex-shrink: 0;
}

.variant-cell {
    min-height: 100px;
    min-width: 0;
    overflow: hidden;
}

.variant-cell.unavailable {
    background: #f5f5f5 !important;
    opacity: 0.5;
}

.color-swatch {
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border);
}

.cell-price {
    font-weight: 700;
}

.selection-summary {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
}

#elge-load-more {
    margin-top: 24px;
}

/* --- Mobile --- */
.product-variations__card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background-color: var(--white);
}

.product-variations__card-header::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 1px;
    background-color: var(--border);
}

.product-variations__card-header,
.product-variations__card-controls {
    position: relative;
    display: inline-flex;
    justify-content: space-between;
    width: 100%;
}

.product-variations__card-header {
    align-items: center;
}

.product-variations__card-header {
    align-items: flex-start;
}

.product-variations__card-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.qty-input-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
}

.qty-btn {
    width: 32px;
    height: 32px;
    color: var(--grey-mid);
    border: 1px solid var(--border);
    background: var(--grey);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s;
    outline: none;
}

.qty-btn:hover {
    color: var(--blue-mid);
    background: var(--blue-light);
    border: 1px solid var(--blue-mid);
}

.qty-input[type=number]::-webkit-outer-spin-button,
.qty-input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-input {
    width: 60px;
    height: 32px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
}

.qty-input:focus {
    outline: none;
    border: 1px solid var(--blue-mid);
}

/* --- Modale produit --- */
.product-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 32px;
    background: var(--blue-dark);
    border-radius: 14px 14px 0 0;
}

@media screen and (max-width: 781px) {
    .product-modal__header {
        padding: 16px;
    }
}

.product-modal__header-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-modal__header-cat {
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--grey-mid);
    text-transform: uppercase;
}

.product-modal__header-name {
    color: var(--white);
    font-weight: 700;
    font-size: 1.4rem;
}

.product-modal__header-ref {
    font-weight: 700;
    color: var(--grey-mid);
}

.product-modal__close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.product-modal__close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    flex-shrink: 0;
}

.product-modal__body {
    padding: 32px;
    border-radius: 0 0 14px 14px;
    background-color: var(--white);
}

@media screen and (max-width: 781px) {
    .product-modal__body {
        padding: 16px;
    }
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 32px;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: border-color 0.3s, transform 0.3s;
    overflow: hidden;
}

.gallery-item:hover {
    border-color: var(--blue);
    transform: scale(1.02);
}

.gallery-item.main {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item.thumbnail.active {
    border-color: var(--blue);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-section {
    margin-bottom: 32px;
}

.product-modal__section-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--grey-mid);
    padding-bottom: 6px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.product-modal__desc {
    line-height: 1.6;
    color: var(--blue-dark);
}

.product-modal__specs {
    display: grid;
    gap: 12px;
}

@media screen and (max-width: 781px) {

    .product-modal__specs,
    .product-modal__docs {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media screen and (min-width: 781.01px) and (max-width: 1024px) {

    .product-modal__specs,
    .product-modal__docs {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 1024.01px) {

    .product-modal__specs,
    .product-modal__docs {
        grid-template-columns: repeat(3, 1fr);
    }
}

.product-modal__specs-item {
    background-color: var(--grey);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: 6px;
}

.product-modal__specs-key {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04rem;
    text-transform: uppercase;
    color: var(--grey-mid);
    margin-bottom: 4px;
}

.product-modal__specs-val {
    color: var(--blue-dark);
    font-weight: 500;
}

.product-modal__docs {
    display: grid;
    gap: 12px;
}

.product-modal__docs-pdf {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--grey);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--blue-dark);
    font-weight: 500;
    transition: background 0.3s, color 0.3s, border 0.3s;
}

.product-modal__docs-pdf:hover {
    background: var(--blue-light);
    border: 1px solid var(--blue-mid);
    color: var(--blue-mid);
}

.pdf-icon {
    font-size: 1.5rem;
}

/* --- WooCommerce --- */
.wc-block-components-button {
    width: fit-content;
    border: none;
    font-size: 1rem;
    border-radius: 6px;
    padding: 8px 16px;
    transition: background 0.3s, transform 0.3s;
    height: 41px;
}

.wc-block-components-button:hover {
    background: var(--blue-mid);
    transform: translateY(-1px);
}

/* --- Mini panier --- */
.wp-block-woocommerce-filled-mini-cart-contents-block {
    background-color: var(--white);
}

.wc-block-components-drawer {
    border: none;
}

h2.wc-block-mini-cart__title,
.wc-block-mini-cart-empty__title {
    display: flex;
    align-items: center;
    min-height: 64px;
    margin: 0;
    padding: 16px;
    mask-image: none;
    background-color: var(--blue-dark);
    color: var(--white);
}

.wc-block-components-button.wc-block-components-drawer__close {
    background: rgba(255, 255, 255, 0.1) !important;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    top: 35px;
    right: 35px;
    width: 34px !important;
    height: 34px !important;
    min-height: unset !important;
    opacity: 1;
    transition: background 0.3s;
}

.wc-block-components-button.wc-block-components-drawer__close svg {
    fill: var(--white);
}

.wc-block-components-button.wc-block-components-drawer__close:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.2);
}

div:where(.wp-block-woocommerce-mini-cart-contents) {
    background-color: var(--white);
}

.wc-block-mini-cart-empty__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    height: calc(100dvh - 64px);
}

.wc-block-cart-items tbody {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wc-block-cart-items__row {
    position: relative;
    background: var(--grey);
    border: 1px solid var(--border) !important;
    border-radius: 8px;
    padding: 16px !important;
    align-items: flex-start;
    transition: border-color 0.3s;
}

.wc-block-cart-items__row:hover {
    border: 1px solid var(--blue-mid) !important;
}

.wc-block-cart-item__image {
    display: flex;
    align-items: center;

}

.wc-block-cart-item__image img {
    border-radius: 8px;
    border: 1px solid var(--border);
}

.wc-block-components-product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--blue-dark);
}

.wc-block-cart-item__prices {
    color: var(--grey-mid);
}

.wc-block-components-product-details {
    font-weight: 500;
    font-size: 0.875rem !important;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
}

.wc-block-cart-item__prices {
    display: none !important;
}

.wc-block-components-product-details__sku {
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--grey-mid);
}

.wc-block-components-product-details__sku .wc-block-components-product-details__name {
    display: none;
}

.wc-block-components-product-details>span:not(.wc-block-components-product-details__sku) {
    padding: 4px 8px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.wc-block-components-product-details span[aria-hidden="true"] {
    display: none;
}

.wc-block-components-quantity-selector {
    background-color: var(--white);
    border: 1px solid var(--border);
}

.wc-block-components-quantity-selector input:focus,
.wc-block-components-quantity-selector button:focus {
    box-shadow: inset 0 0 1px 1px var(--blue) !important;
}

.wc-block-components-product-price__value {
    font-weight: 700;
}

.wc-block-cart-item__total {
    height: 100%;
    align-items: flex-end;
}

.wc-block-cart-item__remove-link {
    position: absolute;
    top: 16px;
    right: 16px;
}

.wc-block-cart-item__remove-link svg {
    fill: var(--grey-mid) !important;
}

.wc-block-mini-cart__footer {
    background-color: var(--grey);
    padding: 24px;
    border-top: 1px solid var(--border);
}

.wc-block-mini-cart__title {
    order: 1;
}

.wc-block-components-notices {
    order: 2;
}

.wc-block-mini-cart__items {
    order: 3;
    padding: 16px;
}

.wc-block-mini-cart__footer {
    order: 4;
}

.wc-block-mini-cart__drawer .wp-block-woocommerce-mini-cart-contents .wc-block-components-notices {
    margin: 0;
}

.wc-block-components-notice-banner {
    margin: 0;
}

/* --- Mini panier vide --- */
.wp-block-woocommerce-empty-mini-cart-contents-block .wc-block-mini-cart__empty-cart-wrapper {
    height: 100%;
    padding: 0;
}

/* --- Validation de commande --- */
.wp-block-woocommerce-checkout {
    width: 100dvw;
}

.wc-block-components-sidebar-layout {
    gap: 24px;
}

@media (min-width: 782px) {
    .wc-block-components-sidebar-layout {
        display: grid;
        grid-template-columns: 1.5fr 1fr;
    }
}

.wc-block-components-sidebar-layout>.wc-block-components-sidebar {
    border-radius: 10px;
    order: 1;
    margin: 0;
}

.wc-block-components-sidebar-layout>.wc-block-components-main {
    order: 2;
}

.wc-block-components-sidebar {
    width: 100%;
    padding: 0;
    background-color: var(--white);
}

.wc-block-components-sidebar-layout .wc-block-components-main {
    width: 100%;
}

.wc-block-components-sidebar,
.wc-block-components-main {
    box-shadow: 0 2px 12px rgba(0, 30, 56, 0.09);
}

@media (min-width: 782px) {
    .wp-block-woocommerce-checkout-order-summary-block {
        border: 1px solid var(--border);
        border-radius: 10px;
    }
}

.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title {
    margin: 0;
    padding: 16px;
    background-color: var(--blue-dark);
    color: var(--white);
    border-radius: 10px 10px 0 0;
    text-transform: uppercase;
}

@media (max-width: 782px) {
    .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title {
        border-radius: 10px;
    }
}

.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title .wc-block-components-checkout-order-summary__title-text {
    color: var(--white);
    font-size: 0.875rem;
    margin: 0;
    font-weight: 600;
}

.wc-block-components-order-summary .wc-block-components-order-summary-item__quantity {
    background: var(--blue-mid);
    color: var(--white);
    border: none;
}

.wc-block-components-order-summary .wc-block-components-order-summary-item__image {
    width: 88px;
}

.wc-block-components-order-summary .wc-block-components-order-summary-item__image>img {
    height: 100%;
    width: 100%;
    max-width: unset;
    object-fit: contain;
    aspect-ratio: 1/1;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.wc-block-components-order-summary {
    padding: 24px;
}

.wc-block-components-order-summary .wc-block-components-order-summary__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wc-block-components-order-summary .wc-block-components-order-summary-item:last-child {
    border-bottom: 1px solid var(--border);
}

.wc-block-components-order-summary .wc-block-components-order-summary-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    align-items: flex-start;
    transition: border-color 0.3s;
}

.wc-block-components-order-summary .wc-block-components-order-summary-item:hover {
    border: 1px solid var(--blue-mid);
}

.wc-block-components-totals-wrapper,
.wp-block-woocommerce-checkout-order-summary-totals-block {
    border-top: 1px solid var(--border);
}

.wc-block-components-sidebar-layout .wc-block-components-main {
    background-color: var(--white);
    border: 1px solid var(--border);
    padding: 0;
    border-radius: 10px;
}

.checkout-order-info {
    margin: 0;
    padding: 16px;
    background-color: var(--blue);
    color: var(--white);
    border-radius: 10px 10px 0 0;
}

.checkout-order-info h2 {
    color: var(--white);
    text-transform: uppercase;
    font-size: 0.875rem !important;
    font-weight: 600;
}

.wc-block-components-title.wc-block-components-title {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.875rem;
}

.wc-block-components-form .wc-block-components-checkout-step {
    padding: 24px;
    margin: 0;
}

.wc-block-components-form input,
.wc-block-components-form select,
.wc-block-components-form textarea {
    outline: none;
    border: 1px solid var(--border) !important;
    transition: border 0.3s;
}

.wc-block-components-form input:focus,
.wc-block-components-form select:focus,
.wc-block-components-form textarea:focus {
    border: 1px solid var(--blue-mid) !important;
}

.wc-block-components-form .wc-block-components-text-input label,
.wc-block-components-text-input label,
.wc-blocks-components-select .wc-blocks-components-select__label {
    color: var(--grey-mid);
}

.wc-block-checkout__terms {
    border-top: 1px solid var(--border);
}

.wc-block-checkout__terms,
.wc-block-checkout__actions {
    margin: 0;
    padding: 24px;
}

.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.wc-block-components-radio-control--highlight-checked label.wc-block-components-radio-control__option--checked-option-highlighted {
    box-shadow: none;
    border: 1px solid var(--blue-mid);
}

/* --- Confirmation de commande --- */
.woocommerce-order-received main {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0 auto;
}

.wc-block-order-confirmation-status {
    background-color: var(--blue-dark);
    border-radius: 10px;
    padding: 32px !important;
    margin: 0 !important;
}

.wc-block-order-confirmation-status h1 {
    border-left: none;
    padding-left: 0;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.wc-block-order-confirmation-status p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9375rem;
    margin: 0;
}

.wc-block-order-confirmation-summary {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px !important;
    margin: 0 !important;
    box-shadow: 0 2px 12px rgba(0, 30, 56, 0.09);
}

.wc-block-order-confirmation-summary-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    padding: 0 !important;
    margin: 0;
}

.wc-block-order-confirmation-summary-list-item {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 4px;
    padding: 12px 16px;
    background-color: var(--grey);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.wc-block-order-confirmation-summary-list-item__key {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--grey-mid);
}

.wc-block-order-confirmation-summary-list-item__value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--blue-dark);
}

.wc-block-order-confirmation-order-note p:not(.woocommerce-customer-details--phone),
.wc-block-order-confirmation-shipping-address p:not(.woocommerce-customer-details--phone) {
    padding: 0;
    margin: 0;
}

/* --- Wrapper détails + adresses --- */
.wc-block-order-confirmation-totals-wrapper,
.wc-block-order-confirmation-shipping-wrapper,
.wc-block-order-confirmation-billing-wrapper {
    background-color: var(--white);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 30, 56, 0.09);
    margin: 0 !important;
}

.wc-block-order-confirmation-totals-wrapper h2.wp-block-heading,
.wc-block-order-confirmation-shipping-wrapper h2.wp-block-heading,
.wc-block-order-confirmation-billing-wrapper h2.wp-block-heading {
    margin: 0;
    padding: 14px 24px;
    background-color: var(--blue-dark);
    color: var(--white);
    font-size: 0.875rem !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: none;
}

.wc-block-order-confirmation-totals {
    padding: 0 !important;
    margin: 0 !important;
}

.wc-block-order-confirmation-totals__table {
    width: 100%;
    border-collapse: collapse;
}

.wc-block-order-confirmation-totals__table thead tr {
    background-color: var(--grey);
    border-bottom: 1px solid var(--border);
}

.wc-block-order-confirmation-totals__table thead th {
    padding: 12px 24px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--grey-mid);
    text-align: left;
}

.wc-block-order-confirmation-totals__table thead th.wc-block-order-confirmation-totals__total {
    text-align: right;
}

.woocommerce-table__line-item {
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.woocommerce-table__line-item:hover {
    background-color: var(--grey);
}

.wc-block-order-confirmation-totals__product,
.wc-block-order-confirmation-totals__total {
    padding: 16px 24px;
    vertical-align: middle;
}

.wc-block-order-confirmation-totals__product a {
    font-weight: 600;
    color: var(--blue-dark);
    transition: color 0.2s;
}

.wc-block-order-confirmation-totals__product a:hover {
    color: var(--blue-mid);
}

.wc-block-order-confirmation-totals__product .product-quantity {
    font-weight: 500;
    color: var(--grey-mid);
    font-size: 0.875rem;
    margin-left: 4px;
}

.wc-block-order-confirmation-totals__total {
    text-align: right;
    font-weight: 700;
    color: var(--blue-dark);
    white-space: nowrap;
}

.wc-block-order-confirmation-totals__table tfoot tr {
    border-top: 1px solid var(--border);
}

.wc-block-order-confirmation-totals__table tfoot th,
.wc-block-order-confirmation-totals__table tfoot td {
    padding: 12px 24px;
    font-size: 0.875rem;
    color: var(--grey-mid);
}

.wc-block-order-confirmation-totals__table tfoot tr:last-child th,
.wc-block-order-confirmation-totals__table tfoot tr:last-child td {
    font-size: 1rem;
    font-weight: 700;
    color: var(--blue-dark);
    background-color: var(--grey);
    border-top: 1px solid var(--border);
}

.wc-block-order-confirmation-totals__table tfoot td {
    text-align: right;
}

.wc-block-order-confirmation-order-note,
.wc-block-order-confirmation-shipping-address,
.wc-block-order-confirmation-billing-address {
    border-radius: none;
    border: none;
}

.wc-block-order-confirmation-totals table {
    border: none;
}

.wc-block-order-confirmation-order-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 16px 24px;
    background-color: var(--grey);
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    margin-top: 0;
}

.wc-block-order-confirmation-order-note p {
    margin: 0;
}

.wc-block-order-confirmation-order-note__label {
    font-weight: 600;
    color: var(--grey-mid);
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding-top: 2px;
}

.wc-block-order-confirmation-address-wrapper {
    gap: 24px !important;
    margin: 0 !important;
}

.wc-block-order-confirmation-address-wrapper .wp-block-column {
    margin: 0 !important;
}

/* Contenu adresse */
.wc-block-order-confirmation-shipping-address,
.wc-block-order-confirmation-billing-address {
    padding: 20px 24px !important;
    margin: 0 !important;
}

.wc-block-order-confirmation-shipping-address address,
.wc-block-order-confirmation-billing-address address {
    font-style: normal;
    line-height: 1.7;
    color: var(--blue-dark);
    font-size: 0.9375rem;
}

.wc-block-order-confirmation-shipping-address .woocommerce-customer-details--phone,
.wc-block-order-confirmation-billing-address .woocommerce-customer-details--phone {
    margin: 8px 0 0;
    font-weight: 600;
    color: var(--grey-mid);
    font-size: 0.875rem;
}

@media (max-width: 782px) {
    .wc-block-order-confirmation-summary-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .wc-block-order-confirmation-address-wrapper {
        flex-direction: column !important;
    }

    .wc-block-order-confirmation-totals__product,
    .wc-block-order-confirmation-totals__total {
        padding: 12px 16px;
    }

    .wc-block-order-confirmation-totals__table thead th,
    .wc-block-order-confirmation-totals__table tfoot th,
    .wc-block-order-confirmation-totals__table tfoot td {
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .wc-block-order-confirmation-summary-list {
        grid-template-columns: 1fr 1fr;
    }

    .wc-block-order-confirmation-status {
        padding: 24px !important;
    }
}