/* ==========================================================================
   CHECKOUT LAYOUT (desktop first)
   ========================================================================== */


/* 1) Barre de navigation du checkout (top sticky style) */
.checkout-navigation {
    align-items: center;
    background: var(--color-background--dark);
    border-bottom: 1px solid var(--color-navigation-border);
    box-shadow: 0 25px 25px -25px var(--color-navigation-shadow);
    display: flex;
    height: 70px;
    justify-content: space-between;
    padding: 0 32px;
    width: 100%;
    z-index: 700;
}


/* Logo */
 .site-navigation__logo {
    text-decoration: none;
    margin: 0 60px 0 0;
}

 .site-navigation__logo span {
    color: var(--color-text--light);
    font-size: 21px;
    letter-spacing: -0.5px;
}

 .site-navigation__logo span:nth-child(1) {
    color: var(--color-primary);
}

 .site-navigation__logo span:nth-child(2) {
    margin-left: -5px;
}

 .site-navigation__logo span:nth-child(3) {
    color: var(--color-primary);
    font-size: 8px;
    letter-spacing: 1px;
    position: absolute;
    bottom: -5px;
    left: calc(50% + 11px);
    text-transform: uppercase;
    width: 160px;

    font-weight: 500;
}

@media all and (max-width: 992px) {
     .site-navigation__logo {
        margin: 0 0 0 24px;
    }
}

@media all and (max-width: 576px) {
     .site-navigation__logo {
        display: none;
    }
}


.checkout-navigation .btn-cancel {
    color: #fff;
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 14px;
    font-style: normal;
    font-weight: 450;
    letter-spacing: 0;
    line-height: normal;
}
.checkout-navigation .btn-cancel:hover {
    text-decoration: underline;
}

/* 2) Wrapper général de la page checkout */
.page-content {
    background: #fff;
    padding: 0 32px;
    position: relative;
}

/* Fond moitié droite (effet colonne récap) */
.page-content:before {
    background: var(--color-background);
    content: "";
    height: 100%;
    position: absolute;
    right: 0;
    top: 0;
    width: 50%;
}

/* 3) Notices WooCommerce (erreurs/promo) */
.woocommerce-NoticeGroup.woocommerce-NoticeGroup-checkout {
    width: 100%;
}
.woocommerce-NoticeGroup.woocommerce-NoticeGroup-checkout .woocommerce-error {
    align-items: flex-start;
    background: var(--color-catalogue-product-background);
    border: 1px solid #b81c23;
    box-shadow: 0 2px 4px #d8e1e8;
    display: flex;
    flex-direction: column;
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    justify-content: flex-start;
    letter-spacing: 0;
    line-height: normal;
    margin: 0;
}
.woocommerce-NoticeGroup.woocommerce-NoticeGroup-checkout .woocommerce-error:before {
    top: 19px;
}

/* Notices globales */
.woocommerce-notices-wrapper {
    margin: 0 auto;
    max-width: 1270px;
    padding-top: 32px;
    z-index: 400;
}
.woocommerce-notices-wrapper .woocommerce-error {
    align-items: flex-start;
    background: var(--color-catalogue-product-background);
    border: 1px solid #b81c23;
    box-shadow: 0 2px 4px #d8e1e8;
    display: flex;
    flex-direction: column;
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    justify-content: flex-start;
    letter-spacing: 0;
    line-height: normal;
    margin: 0;
}
.woocommerce-notices-wrapper .woocommerce-error:before {
    top: 19px;
}

/* 4) Container principal du checkout */
.checkout-container {
    margin: 0 auto;
    max-width: 1270px;
    width: 100%;
}

/* On masque le bouton Woo natif (on utilise le nôtre) */
.checkout-container .place-order,
.checkout-container button[name=woocommerce_checkout_place_order] {
    display: none;
}

/* Paiement */
.checkout-container .woocommerce-checkout-payment {
    width: 100%;
}

/* Grille principale : formulaire + récap */
.checkout-container .woocommerce-checkout {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    min-height: 100vh;
}

/* 5) Colonne gauche : formulaire de facturation + paiement */
.checkout-container .woocommerce-checkout .checkout__column {
    background: #fff;
    padding-right: 32px;
    padding-top: 50px;
    width: calc(100% - 400px);
}

/* 6) Colonne droite : récapitulatif */
.checkout-container .woocommerce-checkout .checkout__review {
    padding-top: 100px;
    width: 400px;
    z-index: 400;
    background: var(--color-background);
    padding: 32px;
}

/* Organisation du bloc récap (totaux / paiement) */
.checkout-container .woocommerce-checkout .woocommerce-checkout-review-order {
    align-items: center;
    display: flex;
    flex-direction: column-reverse;
    justify-content: center;
}

/* 7) Champs de facturation */
.checkout-container .woocommerce-checkout .woocommerce-billing-fields {
    margin: 0 0 32px;
}
.checkout-container .woocommerce-checkout .woocommerce-billing-fields label {
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 13px;
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.5;
    margin: 16px 0 4px;
}
.checkout-container .woocommerce-checkout .woocommerce-billing-fields select {
    width: 100%;
    border: 1px solid #ccc;
    height: 34px;
    border-radius: 3px;
}
.checkout-container .woocommerce-checkout .woocommerce-billing-fields label abbr {
    color: darkred;
}
.checkout-container .woocommerce-checkout .woocommerce-billing-fields .woocommerce-input-wrapper {
    display: block;
    width: 100%;
}
.checkout-container .woocommerce-checkout .woocommerce-billing-fields .woocommerce-input-wrapper input {
    border: 1px solid #ccc;
    border-radius: 3px;
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 34px;
    padding: 0 10px;
    width: 100%;
}

/* Select2 pour pays / états */
.checkout-container .woocommerce-checkout .woocommerce-billing-fields .woocommerce-input-wrapper .select2-container .select2-selection--single {
    border: 1px solid #ccc;
    border-radius: 3px;
    height: 34px;
}
.checkout-container .woocommerce-checkout .woocommerce-billing-fields .woocommerce-input-wrapper .select2-container--default .select2-selection--single .select2-selection__rendered {
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 34px;
    width: 100%;
}

/* Titres sections form */
.checkout-container .woocommerce-checkout .adresse-facturation,
.checkout-container .woocommerce-checkout .mode-payment {
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0;
    line-height: normal;
    margin: 0 0 8px;
}
.checkout-container .woocommerce-checkout .mode-payment span {
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0;
    line-height: normal;
}

/* 8) Récap panier dans le checkout (colonne gauche) */
.checkout-container .cart_details {
    margin: 32px 0;
}
.checkout-container .cart_details .cart-title {
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0;
    line-height: normal;
    margin: 0 0 8px;
}
.checkout-container .cart_details .cart-title span {
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0;
    line-height: normal;
}

/* Ligne produit dans le récap */
.checkout-container .cart_details .cart-item {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 16px 0;
}
.checkout-container .cart_details .cart-item:not(:last-child) {
    border-bottom: 1px solid #ccc;
}

.checkout-container .cart_details .cart-item .cart-item__column:first-child {
    width: 150px;
}
.checkout-container .cart_details .cart-item .cart-item__column:nth-child(2) {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 4px 8px;
    width: calc(100% - 150px);
}

/* Vignette produit */
.checkout-container .cart_details .cart-item .product-thumbnail {
    height: auto;
    min-height: 80px;
    width: 100%;
}
.checkout-container .cart_details .cart-item .product-thumbnail img {
    height: 100%;
    left: 0;
    object-fit: cover;
    position: absolute;
    top: 0;
    width: 100%;
}

/* Badge produit */
.checkout-container .cart_details .cart-item .product-thumbnail__badge {
    background-color: var(--color-product-thumb-badge-soon-background);
    color: var(--color-product-thumb-badge-soon-text);
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    left: -8px;
    letter-spacing: 0;
    line-height: 28px;
    padding: 0 16px;
    pointer-events: none;
    position: absolute;
    top: 16px;
    z-index: 200;
}
.checkout-container .cart_details .cart-item .product-thumbnail__badge:before {
    border-color: transparent transparent var(--color-product-thumb-badge-soon-arrow) transparent;
    border-style: solid;
    border-width: 0 0 8px 8px;
    content: "";
    height: 0;
    left: 0;
    position: absolute;
    top: -8px;
    transform: rotate(0deg);
    width: 0;
}

/* Nom produit + sous-titre */
.checkout-container .cart_details .cart-item .product-name {
    width: calc(100% - 85px);
}
.checkout-container .cart_details .cart-item .product-name span {
    display: block;
}
.checkout-container .cart_details .cart-item .product-name .product-subtitle {
    color: var(--color-primary);
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0;
    line-height: normal;
    margin: 0 0 4px;
    text-transform: uppercase;
}
.checkout-container .cart_details .cart-item .product-name .product-title {
    color: #252e38;
    display: block;
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0;
    line-height: normal;
    width: 100%;
}

/* Bouton “commencer” dans le récap */
.checkout-container .cart_details .cart-item .btn-start {
    background: var(--color-home-header-btn-background);
    border-radius: 3px;
    color: var(--color-home-header-btn-text);
    display: inline-block;
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 34px;
    margin: 16px 0 0;
    padding: 0 16px;
    text-transform: uppercase;
}

/* Colonne prix à droite dans le récap */
.checkout-container .cart_details .cart-item .product-thumbnail__prices {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 85px;
}
.checkout-container .cart_details .cart-item .product-thumbnail__prices .product-thumbnail__price {
    color: #000;
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 15px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 20px;
}
.checkout-container .cart_details .cart-item .product-thumbnail__prices .product-thumbnail__price.product-thumbnail__price--regular {
    color: var(--color-catalogue-product-price-old);
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 20px;
    text-decoration: line-through;
}
.checkout-container .cart_details .cart-item .product-thumbnail__prices .product-thumbnail__price.product-thumbnail__price--sale {
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 15px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 20px;
}

/* Actions produit (supprimer, wishlist) */
.checkout-container .cart_details .cart-item .product-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    width: 100%;
}
.checkout-container .cart_details .cart-item .product-actions a {
    color: var(--color-catalogue-product-price);
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0;
    line-height: normal;
}
.checkout-container .cart_details .cart-item .product-actions a:hover {
    text-decoration: underline;
}
.checkout-container .cart_details .cart-item .product-actions .product-wishlist {
    align-items: center;
    display: flex;
    justify-content: flex-start;
}
.checkout-container .cart_details .cart-item .product-actions .product-wishlist:before {
    background: var(--color-catalogue-product-price);
    border-radius: 50%;
    content: "";
    height: 4px;
    margin: 0 8px 0 0;
    opacity: .6;
    width: 4px;
}
.checkout-container .cart_details .cart-item .product-actions .product-remove a {
    color: var(--color-catalogue-product-price);
}

/* 9) Mentions légales sous le checkout */
.checkout-container .cart_mentions {
    margin: 64px 0 56px 0;
}
.checkout-container .cart_mentions p {
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.5;
}
.checkout-container .cart_mentions p:not(:last-child) { margin: 0 0 16px; }
.checkout-container .cart_mentions p a {
    color: var(--color-secondary);
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.5;
    text-decoration: underline;
}

/* 10) Bloc récap (colonne droite) */
.checkout-container .checkout__review .cart_totals {
    padding-top: 32px;
    width: 100%;
}
.checkout-container .checkout__review .cart_totals .order_review_heading {
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0;
    line-height: normal;
    margin: 0 0 16px;
}
.checkout-container .checkout__review .cart_totals .order-total {
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 24px;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0;
    line-height: normal;
}
.checkout-container .checkout__review .cart_totals .shop_table,
.checkout-container .checkout__review .cart_totals .shop_table table {
    width: 100%;
}
.checkout-container .checkout__review .cart_totals .order-total th {
    border-top: 1px solid #d5e3ec;
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0;
    line-height: normal;
}
.checkout-container .checkout__review .cart_totals .order-total th span {
    font-size: 14px;
    font-weight: 400;
}
.checkout-container .checkout__review .cart_totals .order-total td {
    border-top: 1px solid #d5e3ec;
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0;
    line-height: normal;
}
.checkout-container .checkout__review .cart_totals tr th {
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    letter-spacing: 0;
    line-height: normal;
    padding: 8px 0;
    text-align: left;
}
.checkout-container .checkout__review .cart_totals tr th span {
    font-size: 12px;
    font-weight: 400;
}
.checkout-container .checkout__review .cart_totals tr td {
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0;
    line-height: normal;
    padding: 8px 0;
    text-align: right;
}

/* CTA final "valider la commande" */
.checkout-container .checkout__review .order-checkout {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}
.checkout-container .checkout__review .order-checkout .cgu-cgv {
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0;
    line-height: normal;
    margin: 32px 0 16px;
    padding: 0 8px;
    width: 100%;
}
.checkout-container .checkout__review .order-checkout .cgu-cgv a {
    color: var(--color-secondary);
    text-decoration: underline;
}
.checkout-container .checkout__review .order-checkout .btn-validate-checkout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 550;
    line-height: 1.5;
    text-decoration: none;
    text-align: center;
    border: 1px solid var(--color-navigation-border);
    border-radius: 3px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    transition: opacity .25s ease,
    border .25s ease,
    background .2s ease,
    color .2s ease;
    width: 100%;
    text-transform: uppercase;
    background: var(--color-primary);
    color: var(--color-text);
}
.checkout-container .checkout__review .order-checkout .btn-validate-checkout svg {
    margin: -3px 8px 0 0;
    width: 20px;
}
.checkout-container .checkout__review .order-checkout .btn-validate-checkout svg * {
    fill: var(--color-home-header-btn-text);
}

/* 11) Page de remerciement (merci / order received) */
.thanks {
    padding: 0 0 150px;
}
.thanks:before { display: none; }

.thanks .checkout-container .woocommerce-checkout {
    min-height: auto;
    width: 100%;
}
.thanks .checkout-container .woocommerce-checkout .checkout__column:first-child {
    background: none;
    width: 100%;
}
.thanks .checkout-container .thanks__title {
    font-family: Inter, sans-serif;
    font-optical-sizing: auto;
    font-size: 32px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 0;
    line-height: normal;
    margin: 0 0 80px;
    text-align: center;
    width: 100%;
}
.thanks .checkout-container .cart_details { margin: 0; }
.thanks .checkout-container .cart_details .cart-item {
    align-items: flex-start;
    display: flex;
    justify-content: center;
}
.thanks .checkout-container .cart_details .cart-item .cart-item__column:first-child {
    height: 50px;
    width: 200px;
}
.thanks .checkout-container .cart_details .cart-item .cart-item__column:nth-child(2) {
    padding: 8px 0 0 16px;
    width: calc(100% - 200px);
}
.thanks .checkout-container .cart_details .cart-item .product-thumbnail {
    min-height: 125px;
}

/* Footer après merci */
.thanks ~ .page-footer {
    margin-top: 0;
}

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

/* <= 1000px : on empile, le récap passe dessous */
@media (max-width: 1000px) {
    .page-content:before {
        display: none;
    }

    .checkout-container .woocommerce-checkout {
        align-items: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .checkout-container .woocommerce-checkout .checkout__column {
        padding-right: 0;
        width: 100%;
    }

    .checkout-container .woocommerce-checkout .checkout__review {
        margin: 32px -32px 0;
        padding: 0 32px 64px;
        width: calc(100% + 64px);
    }

    .thanks .checkout-container .woocommerce-checkout {
        align-items: flex-start;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }
}

/* <= 750px : padding réduit + lignes panier en colonne */
@media (max-width: 750px) {
    .page-content {
        padding: 0 16px;
    }

    /* Récap panier en colonne */
    .checkout-container .cart_details .cart-item {
        align-items: flex-start;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .checkout-container .cart_details .cart-item .cart-item__column:first-child {
        margin: 0 0 8px;
    }

    .checkout-container .cart_details .cart-item .cart-item__column:nth-child(2) {
        padding: 0;
        width: 100%;
    }

    .checkout-container .cart_details .cart-item .product-thumbnail__prices {
        width: 75px;
    }

    .checkout-container .cart_details .cart-item .product-name {
        width: calc(100% - 75px);
    }

    .checkout-container .cart_details .cart-item .product-name .product-title a {
        font-family: Inter, sans-serif;
        font-optical-sizing: auto;
        font-size: 13px;
        font-style: normal;
        font-weight: 500;
        letter-spacing: 0;
        line-height: 1.5;
    }

    .checkout-container .cart_details .cart-item .product-actions {
        align-items: flex-start;
        display: flex;
        flex-direction: column;
        gap: 4px;
        justify-content: flex-start;
        margin: 8px 0 0;
    }

    .checkout-container .cart_details .cart-item .product-actions .product-remove a {
        font-family: Inter, sans-serif;
        font-optical-sizing: auto;
        font-size: 12px;
        font-style: normal;
        font-weight: 400;
        letter-spacing: 0;
        line-height: 1.5;
    }

    .checkout-container .cart_details .cart-item .product-actions .product-wishlist:before {
        display: none;
    }

    .checkout-container .cart_details .cart-item .product-actions .product-wishlist button {
        font-family: Inter, sans-serif;
        font-optical-sizing: auto;
        font-size: 12px;
        font-style: normal;
        font-weight: 400;
        letter-spacing: 0;
        line-height: 1.5;
    }

    .checkout-container .woocommerce-checkout .checkout__review {
        margin: 24px -16px 0;
        padding: 0 16px 32px;
        width: calc(100% + 32px);
    }
}
