/**
 * GHA Theme - Premium Cart & Checkout Styles
 *
 * Design inspired by: Allbirds, Peloton, Sodashi
 * Best practices: Baymard Institute, ConvertCart 2025/2026
 * Aligned with: GHA UI Design System v2
 *
 * @package GHA Theme
 * @since 2.0.0
 */

/* ==========================================================================
   CSS VARIABLES - GHA Design System v2 Palette
   ========================================================================== */
:root {
    /* Primary - Blue */
    --gha-primary: #1e40af;
    --gha-primary-hover: #1e3a8a;
    --gha-primary-light: #dbeafe;
    --gha-primary-dark: #1e3a8a;

    /* Success - Green (CTA Principal) */
    --gha-success: #22c55e;
    --gha-success-hover: #16a34a;
    --gha-success-bg: #dcfce7;
    --gha-success-text: #166534;

    /* Error - Red */
    --gha-error: #ef4444;
    --gha-error-bg: #fee2e2;
    --gha-error-text: #991b1b;

    /* Warning - Amber */
    --gha-warning-bg: #fef3c7;
    --gha-warning-text: #92400e;

    /* Text - Slate */
    --gha-text: #1e293b;
    --gha-text-secondary: #64748b;
    --gha-text-light: #94a3b8;

    /* Borders & Backgrounds - Slate */
    --gha-border: #e2e8f0;
    --gha-border-hover: #cbd5e1;
    --gha-bg: #f8fafc;
    --gha-bg-hover: #f1f5f9;
    --gha-white: #ffffff;

    /* Spacing */
    --gha-radius: 12px;
    --gha-radius-sm: 8px;
    --gha-radius-xs: 6px;

    /* Shadows - Subtle & Premium */
    --gha-shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --gha-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --gha-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --gha-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);

    /* Focus ring */
    --gha-focus-ring: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* ==========================================================================
   WPAUTOP FIX - Neutralize parasitic <p> tags from WordPress
   ========================================================================== */
.gha-cart-container > p,
.gha-checkout-container > p,
.gha-cart-products > p,
.gha-checkout-form-column > p,
.gha-section-body > p:empty,
.woocommerce-billing-fields__field-wrapper > p:empty,
.woocommerce-shipping-fields__field-wrapper > p:empty,
.gha-checkout-progress > p,
.gha-cart-summary > p:empty,
.gha-checkout-summary > p:empty {
    display: none !important;
}

/* Explicit grid placement for children */
.gha-cart-container > .gha-cart-products {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

.gha-cart-container > .gha-cart-summary {
    grid-column: 2 !important;
    grid-row: 1 !important;
}

.gha-checkout-container > .gha-checkout-form-column {
    grid-column: 1 !important;
    grid-row: 1 !important;
}

.gha-checkout-container > .gha-checkout-summary {
    grid-column: 2 !important;
    grid-row: 1 !important;
}

/* ==========================================================================
   WPAUTOP CLEANUP - Hide residual <br /> tags
   ========================================================================== */
/* Masquer tous les <br /> parasites dans nos containers */
.gha-cart-wrap br,
.gha-checkout-wrap br {
    display: none !important;
}

/* Réactiver <br /> uniquement où c'est légitime (adresses) */
.gha-cart-wrap address br,
.gha-checkout-wrap address br,
.woocommerce-customer-details address br {
    display: inline !important;
}

/* ==========================================================================
   THEME PARENT OVERRIDE - Fix top gap
   ========================================================================== */
/* Reset du padding/margin du thème parent sur les pages WooCommerce */
body.woocommerce-cart .entry-content,
body.woocommerce-checkout .entry-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

body.woocommerce-cart .site-main,
body.woocommerce-checkout .site-main {
    padding-top: 0 !important;
}

body.woocommerce-cart article.page,
body.woocommerce-checkout article.page {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Reset WooCommerce wrapper */
body.woocommerce-cart .woocommerce,
body.woocommerce-checkout .woocommerce {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ==========================================================================
   BASE LAYOUT - Compact & Clean Container
   ========================================================================== */
.gha-cart-wrap,
.gha-checkout-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px;
    min-height: auto;
}

/* Clean page background */
body.woocommerce-cart,
body.woocommerce-checkout {
    background-color: var(--gha-bg) !important;
}

/* ==========================================================================
   HEADERS - Compact & Clean
   ========================================================================== */
.gha-cart-header,
.gha-checkout-header {
    margin-bottom: 24px;
    text-align: center;
}

.gha-cart-title,
.gha-checkout-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gha-text);
    margin: 0;
    letter-spacing: -0.3px;
}

.gha-cart-subtitle,
.gha-checkout-subtitle {
    font-size: 13px;
    color: var(--gha-text-secondary);
    margin: 4px 0 0 0;
}

/* ==========================================================================
   PROGRESS BAR - Horizontal Steps (Compact)
   ========================================================================== */
.gha-checkout-progress {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 24px;
    padding: 16px 24px;
    background: var(--gha-white);
    border-radius: var(--gha-radius-sm);
    box-shadow: var(--gha-shadow-sm);
}

.gha-progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gha-text-light);
    font-size: 13px;
    font-weight: 500;
}

/* Add connector line between steps using pseudo-element */
.gha-progress-step:not(:last-child)::after {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    background: var(--gha-border);
    margin-left: 8px;
}

.gha-progress-step.completed:not(:last-child)::after {
    background: var(--gha-success);
}

.gha-progress-step.active {
    color: var(--gha-primary);
}

.gha-progress-step.completed {
    color: var(--gha-success);
}

.gha-progress-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gha-bg);
    color: var(--gha-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.gha-progress-step.active .gha-progress-number {
    background: var(--gha-primary);
    color: var(--gha-white);
    box-shadow: 0 0 0 3px var(--gha-primary-light);
}

.gha-progress-step.completed .gha-progress-number {
    background: var(--gha-success);
    color: var(--gha-white);
}

.gha-progress-label {
    font-weight: 600;
}

/* Progress connector line (if added in HTML - not used, using ::after instead) */
.gha-progress-connector {
    display: none;
}

/* ==========================================================================
   CART PAGE - 2 COLUMNS LAYOUT (60/40)
   ========================================================================== */
.gha-cart-container {
    display: grid !important;
    grid-template-columns: 1fr 320px !important;
    gap: 32px !important;
    align-items: start !important;
}

.gha-cart-products {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ==========================================================================
   CART PRODUCT CARDS - Compact Design
   ========================================================================== */
.gha-cart-product {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--gha-white);
    border: 1px solid var(--gha-border);
    border-radius: var(--gha-radius-sm);
    box-shadow: var(--gha-shadow-sm);
    transition: all 0.15s ease;
}

.gha-cart-product:hover {
    border-color: var(--gha-border-hover);
    box-shadow: var(--gha-shadow);
}

.gha-cart-product-image {
    width: 80px;
    flex-shrink: 0;
}

.gha-cart-product-image img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--gha-radius-xs);
    background: var(--gha-bg);
}

.gha-cart-product-info {
    flex: 1;
    min-width: 0;
}

.gha-cart-product-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gha-text);
    margin: 0;
    line-height: 1.4;
}

.gha-cart-product-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}

.gha-cart-product-title a:hover {
    color: var(--gha-primary);
}

.gha-cart-product-meta {
    font-size: 12px;
    color: var(--gha-text-secondary);
    margin-top: 4px;
}

.gha-cart-product-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--gha-text);
    white-space: nowrap;
}

.gha-cart-product-price .woocommerce-Price-currencySymbol {
    font-size: 13px;
}

/* Quantity input - HIDDEN (single purchase only) */
.gha-cart-product-quantity {
    display: none !important;
}

/* Remove button - Compact */
.gha-cart-product-remove a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--gha-bg);
    color: var(--gha-text-light);
    border-radius: var(--gha-radius-xs);
    font-size: 18px;
    text-decoration: none;
    transition: all 0.15s;
    flex-shrink: 0;
}

.gha-cart-product-remove a:hover {
    background: var(--gha-error-bg);
    color: var(--gha-error-text);
}

/* ==========================================================================
   CART SUMMARY - Compact Sticky Sidebar
   ========================================================================== */
.gha-cart-summary {
    position: sticky;
    top: 20px;
}

.gha-cart-summary .gha-section-card {
    background: var(--gha-white);
    border: 1px solid var(--gha-border);
    border-radius: var(--gha-radius-sm);
    box-shadow: var(--gha-shadow);
    overflow: hidden;
}

/* ==========================================================================
   CHECKOUT PAGE - 2 COLUMNS LAYOUT (60/40)
   ========================================================================== */
.gha-checkout-container {
    display: grid !important;
    grid-template-columns: 1fr 340px !important;
    gap: 32px !important;
    align-items: start !important;
}

.gha-checkout-form-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gha-checkout-summary {
    position: sticky;
    top: 20px;
}

/* ==========================================================================
   SECTION CARDS - Compact Containers
   ========================================================================== */
.gha-section-card {
    background: var(--gha-white);
    border: 1px solid var(--gha-border);
    border-radius: var(--gha-radius-sm);
    overflow: hidden;
    box-shadow: var(--gha-shadow-sm);
}

.gha-section-header {
    padding: 14px 20px;
    background: var(--gha-bg);
    border-bottom: 1px solid var(--gha-border);
}

.gha-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--gha-text-secondary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gha-section-title .dashicons {
    color: var(--gha-primary);
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.gha-section-body {
    padding: 20px;
    /* Ensure content fills the container */
    width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
   CART COLLATERALS & TOTALS - Override theme parent (TutorStarter)

   Le style.min.css hérité de TutorStarter applique ces styles génériques :
   .cart-collaterals { background:#fff; box-shadow:...; padding:30px; border-radius:8px }

   On les reset ici car notre .gha-section-card gère déjà le container visuel.
   ========================================================================== */

/* Reset cart-collaterals - remove the duplicate box styling */
.cart-collaterals {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: both !important;
    display: block !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Reset cart_totals - the inner container */
.cart_totals {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: both !important;
    display: block !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Ensure our table fills the container */
.cart_totals .gha-totals-table {
    width: 100% !important;
    margin: 0 !important;
}

/* Hide WooCommerce's "Détails de facturation" h3 (redundant with our header) */
.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3,
#ship-to-different-address {
    display: none !important;
}

/* ==========================================================================
   FORM FIELDS - Compact Inputs
   ========================================================================== */
.woocommerce-billing-fields__field-wrapper,
.woocommerce-shipping-fields__field-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
}

.woocommerce-billing-fields__field-wrapper .form-row-wide,
.woocommerce-shipping-fields__field-wrapper .form-row-wide {
    grid-column: 1 / -1 !important;
}

/* Form row (usually <p> tags) */
.form-row,
p.form-row {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

/* Only set display:block on visible form rows (not hidden by WooCommerce) */
.form-row:not([style*="display: none"]),
p.form-row:not([style*="display: none"]) {
    display: block !important;
}

.form-row-first {
    grid-column: 1 !important;
}

.form-row-last {
    grid-column: 2 !important;
}

/* Labels */
.form-row label {
    display: block !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--gha-text-secondary) !important;
    margin-bottom: 6px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
}

.form-row label .required {
    color: var(--gha-error) !important;
}

.form-row label .optional {
    color: var(--gha-text-light) !important;
    font-weight: 400 !important;
    text-transform: none !important;
    font-size: 10px !important;
}

/* Input wrapper */
.form-row .woocommerce-input-wrapper {
    display: block !important;
    width: 100% !important;
}

/* All input types - Compact */
.form-row input.input-text,
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="number"],
.form-row select,
.form-row textarea {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid var(--gha-border) !important;
    border-radius: var(--gha-radius-xs) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: var(--gha-text) !important;
    background: var(--gha-white) !important;
    transition: all 0.15s ease !important;
    box-sizing: border-box !important;
    min-height: 42px !important;
    -webkit-appearance: none !important;
}

.form-row input.input-text:hover,
.form-row select:hover {
    border-color: var(--gha-border-hover) !important;
}

.form-row input.input-text:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none !important;
    border-color: var(--gha-primary) !important;
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.1) !important;
}

.form-row input.input-text::placeholder {
    color: var(--gha-text-light) !important;
    font-weight: 400 !important;
}

/* Select2 Dropdowns - Compact */
.select2-container--default .select2-selection--single {
    height: 42px !important;
    border: 1px solid var(--gha-border) !important;
    border-radius: var(--gha-radius-xs) !important;
    background: var(--gha-white) !important;
    transition: all 0.15s !important;
}

.select2-container--default .select2-selection--single:hover {
    border-color: var(--gha-border-hover) !important;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--gha-primary) !important;
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.1) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 40px !important;
    padding-left: 12px !important;
    padding-right: 32px !important;
    color: var(--gha-text) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
    right: 8px !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--gha-text-light) !important;
}

/* Select2 Dropdown */
.select2-dropdown {
    border: 2px solid var(--gha-border) !important;
    border-radius: var(--gha-radius-sm) !important;
    box-shadow: var(--gha-shadow-lg) !important;
    overflow: hidden !important;
}

.select2-results__option {
    padding: 12px 16px !important;
    font-size: 14px !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--gha-primary-light) !important;
    color: var(--gha-primary-dark) !important;
}

/* Validation states */
.form-row.woocommerce-validated input.input-text {
    border-color: var(--gha-success) !important;
}

.form-row.woocommerce-invalid input.input-text {
    border-color: var(--gha-error) !important;
}


/* ==========================================================================
   CHECKOUT ORDER RECAP - Premium Product List
   ========================================================================== */
.gha-checkout-products {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.gha-checkout-product {
    display: flex;
    gap: 16px;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gha-border);
}

.gha-checkout-product:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.gha-checkout-product-image {
    width: 72px;
    flex-shrink: 0;
}

.gha-checkout-product-image img {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: var(--gha-radius-xs);
    background: var(--gha-bg);
}

.gha-checkout-product-info {
    flex: 1;
    min-width: 0;
}

.gha-checkout-product-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gha-text);
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.gha-checkout-product-qty {
    font-size: 13px;
    color: var(--gha-text-secondary);
}

.gha-checkout-product-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--gha-text);
    white-space: nowrap;
}

/* ==========================================================================
   ORDER REVIEW TABLE - Clean Custom Table (checkout)
   No visible grid - subtle separators only
   ========================================================================== */
.gha-review-order-table {
    width: 100%;
    border: none !important;
    border-collapse: collapse;
    margin: 0;
}

.gha-review-order-table th,
.gha-review-order-table td {
    padding: 12px 8px;
    border: none !important;
    font-size: 13px;
    vertical-align: middle;
}

/* Only horizontal separator between rows */
.gha-review-order-table tr {
    border-bottom: 1px solid var(--gha-border);
}

.gha-review-order-table tr:last-child {
    border-bottom: none;
}

.gha-review-order-table thead th {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--gha-text-light);
    font-weight: 600;
    letter-spacing: 0.5px;
    padding-bottom: 10px;
    background: transparent;
    text-align: left;
}

.gha-review-order-table thead th.product-total {
    text-align: right;
}

.gha-review-order-table tbody .product-name {
    color: var(--gha-text);
    font-weight: 500;
    font-size: 13px;
}

.gha-review-order-table tbody .product-total {
    text-align: right;
    color: var(--gha-text);
    font-weight: 600;
}

.gha-review-order-table tfoot th {
    text-align: left;
    font-weight: 500;
    color: var(--gha-text-secondary);
    font-size: 13px;
}

.gha-review-order-table tfoot td {
    text-align: right;
    color: var(--gha-text);
    font-weight: 600;
}

/* Order Total - Clean */
.gha-review-order-table .order-total th,
.gha-review-order-table .order-total td {
    padding-top: 14px;
    border-top: 1px solid var(--gha-border);
    border-bottom: none;
}

.gha-review-order-table .order-total th {
    font-size: 14px;
    font-weight: 600;
    color: var(--gha-text);
}

.gha-review-order-table .order-total td {
    font-size: 18px;
    font-weight: 700;
}

.gha-review-order-table .order-total .woocommerce-Price-amount {
    color: var(--gha-success);
}

/* ==========================================================================
   PAYMENT METHODS - Compact Selection
   ========================================================================== */
#payment {
    background: transparent !important;
    margin-top: 16px !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Reset any wrapper that might add borders */
.woocommerce-checkout-payment {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

#payment ul.payment_methods {
    padding: 0 !important;
    margin: 0 0 16px 0 !important;
    list-style: none !important;
    border: none !important;
}

#payment ul.payment_methods li {
    background: var(--gha-white) !important;
    border: 1px solid var(--gha-border) !important;
    border-radius: var(--gha-radius-xs) !important;
    margin-bottom: 8px !important;
    padding: 12px 14px !important;
    transition: all 0.15s ease !important;
}

#payment ul.payment_methods li:last-child {
    margin-bottom: 0 !important;
}

#payment ul.payment_methods li:hover {
    border-color: var(--gha-border-hover) !important;
}

/* Selected payment method */
#payment ul.payment_methods li:has(input:checked) {
    background: var(--gha-primary-light) !important;
    border-color: var(--gha-primary) !important;
}

/* Payment method label - horizontal layout */
#payment ul.payment_methods li label {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--gha-text) !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Radio button inline with text */
#payment ul.payment_methods li input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    accent-color: var(--gha-primary) !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    position: static !important;
}

/* Payment method icon */
#payment ul.payment_methods li img {
    max-height: 24px !important;
    width: auto !important;
    margin-left: 8px !important;
}

#payment .payment_box {
    background: var(--gha-bg) !important;
    border: none !important;
    border-radius: 0 0 var(--gha-radius-xs) var(--gha-radius-xs) !important;
    padding: 10px 14px !important;
    margin: 8px -14px -12px -14px !important;
    font-size: 12px !important;
    color: var(--gha-text-secondary) !important;
    line-height: 1.4 !important;
}

#payment .payment_box::before {
    display: none !important;
}

/* ==========================================================================
   CTA BUTTONS - Compact & Clean
   ========================================================================== */

/* Place Order - Primary CTA (Green for conversion) */
#place_order {
    display: block !important;
    width: 100% !important;
    padding: 14px 20px !important;
    background: var(--gha-success) !important;
    color: var(--gha-white) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: center !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    border-radius: var(--gha-radius-sm) !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25) !important;
    margin-top: 12px !important;
    white-space: nowrap !important;
}

#place_order:hover {
    background: var(--gha-success-hover) !important;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35) !important;
}

#place_order:active {
    transform: translateY(0) !important;
}

#place_order:disabled {
    background: var(--gha-border-hover) !important;
    color: var(--gha-text-light) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Checkout button container (cart page) */
.wc-proceed-to-checkout {
    display: block !important;
    width: 100% !important;
    margin-top: 16px !important;
}

/* Checkout button (cart page) - Compact */
.wc-proceed-to-checkout a.checkout-button {
    display: block !important;
    width: 100% !important;
    padding: 14px 20px !important;
    background: var(--gha-success) !important;
    color: var(--gha-white) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: center !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
    border-radius: var(--gha-radius-sm) !important;
    transition: all 0.15s ease !important;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25) !important;
    white-space: normal !important;
    overflow: visible !important;
}

.wc-proceed-to-checkout a.checkout-button:hover {
    background: var(--gha-success-hover) !important;
    color: var(--gha-white) !important;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35) !important;
}

/* ==========================================================================
   TRUST BADGES - Compact
   ========================================================================== */
.gha-trust-badges {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gha-border);
}

.gha-trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--gha-text-secondary);
}

.gha-trust-badge .dashicons {
    color: var(--gha-success);
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Réduire le gap après #payment */
#payment {
    margin-bottom: 0 !important;
}

.woocommerce-checkout-payment {
    margin-bottom: 0 !important;
}

.gha-checkout-security {
    text-align: center;
    margin-top: 16px;
    padding: 10px 12px;
    background: var(--gha-success-bg);
    border-radius: var(--gha-radius-xs);
    font-size: 11px;
    font-weight: 500;
    color: var(--gha-success-text);
}

.gha-checkout-security .dashicons {
    vertical-align: middle;
    margin-right: 4px;
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   CART TOTALS TABLE - Clean Custom Table (no WooCommerce responsive)
   ========================================================================== */

/* Hide the default "Total panier" title */
.cart_totals h2 {
    display: none !important;
}

/* Our custom table class - simple and clean */
.gha-totals-table {
    width: 100%;
    border: none;
    border-collapse: collapse;
}

.gha-totals-table tr {
    border-bottom: 1px solid var(--gha-border);
}

.gha-totals-table th,
.gha-totals-table td {
    padding: 12px 0;
    border: none;
    font-size: 13px;
    vertical-align: middle;
}

.gha-totals-table th {
    text-align: left;
    color: var(--gha-text-secondary);
    font-weight: 500;
    width: 50%;
}

.gha-totals-table td {
    text-align: right;
    color: var(--gha-text);
    font-weight: 600;
    width: 50%;
}

.gha-totals-table .order-total {
    border-bottom: none;
}

.gha-totals-table .order-total th,
.gha-totals-table .order-total td {
    padding-top: 16px;
    border-top: 1px solid var(--gha-border);
}

.gha-totals-table .order-total th {
    font-size: 14px;
    font-weight: 600;
    color: var(--gha-text);
}

.gha-totals-table .order-total td {
    font-size: 18px;
    font-weight: 700;
}

.gha-totals-table .order-total .woocommerce-Price-amount {
    color: var(--gha-success);
}

/* ==========================================================================
   CART COUPON SECTION - Compact
   ========================================================================== */
.gha-coupon-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--gha-border);
}

.gha-coupon-form {
    display: flex;
    gap: 8px;
}

.gha-coupon-form input.input-text {
    flex: 1 !important;
    padding: 8px 10px !important;
    border: 1px solid var(--gha-border) !important;
    border-radius: var(--gha-radius-xs) !important;
    font-size: 12px !important;
    background: var(--gha-white) !important;
}

.gha-coupon-form input.input-text:focus {
    outline: none !important;
    border-color: var(--gha-primary) !important;
}

.gha-coupon-form button {
    padding: 8px 12px !important;
    border-radius: var(--gha-radius-xs) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    border: none !important;
    background: var(--gha-text) !important;
    color: var(--gha-white) !important;
    white-space: nowrap !important;
}

.gha-coupon-form button:hover {
    background: var(--gha-text-secondary) !important;
}

/* Hide default WooCommerce cart actions (we use custom in summary) */
.gha-cart-actions {
    display: none !important;
}

/* ==========================================================================
   NOTICES - Clean Alerts (Best Practice 2026: tinted bg + left accent)
   Ref: Tailwind UI, Ant Design, Shopify Polaris, Flowbite
   ========================================================================== */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    padding: 16px 20px !important;
    border-radius: var(--gha-radius-sm) !important;
    margin-bottom: 24px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--gha-text) !important;
    list-style: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Kill tutorstarter/WC ::before icons — they conflict with our design */
.woocommerce-error::before,
.woocommerce-message::before,
.woocommerce-info::before {
    display: none !important;
    content: none !important;
}

/* Success — very light green tint */
.woocommerce-message {
    background: #f0fdf4 !important;
    border-left: 4px solid var(--gha-success) !important;
}

/* Error — very light red tint */
.woocommerce-error {
    background: #fef2f2 !important;
    border-left: 4px solid var(--gha-error) !important;
}

/* Info — very light blue tint */
.woocommerce-info {
    background: #eff6ff !important;
    border-left: 4px solid var(--gha-primary) !important;
}

/* Links inherit alert's semantic color (not brand blue) */
.woocommerce-message a {
    color: var(--gha-success-text) !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
}

.woocommerce-error a {
    color: var(--gha-error-text) !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
}

.woocommerce-info a {
    color: var(--gha-primary) !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
}

/* ==========================================================================
   THANK YOU PAGE - GHA Design v2
   ========================================================================== */
.gha-thankyou-wrap {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* Header — confirmation message */
.gha-thankyou-header {
    text-align: center;
    margin-bottom: 32px;
}

.gha-thankyou-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--gha-success-bg);
    color: var(--gha-success-hover);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.gha-thankyou-icon--error {
    background: var(--gha-error-bg);
    color: var(--gha-error);
}

.gha-thankyou-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gha-text);
    margin: 0 0 6px 0;
    letter-spacing: -0.3px;
}

.gha-thankyou-subtitle {
    font-size: 14px;
    color: var(--gha-text-secondary);
    margin: 0;
}

/* Summary card — order details */
.gha-thankyou-summary {
    background: var(--gha-white);
    border: 1px solid var(--gha-border);
    border-radius: var(--gha-radius-sm);
    box-shadow: var(--gha-shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}

.gha-thankyou-details {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gha-thankyou-details::before,
.gha-thankyou-details::after {
    display: none !important;
    content: none !important;
}

.gha-thankyou-details li {
    padding: 16px 20px !important;
    border-right: 1px solid var(--gha-border);
    border-bottom: 1px solid var(--gha-border);
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0 !important;
}

.gha-thankyou-details li:nth-child(3n) {
    border-right: none;
}

.gha-thankyou-details li.email {
    grid-column: span 2;
}

.gha-thankyou-details li:nth-last-child(-n+2) {
    border-bottom: none;
}

.gha-thankyou-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gha-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gha-thankyou-details li strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--gha-text);
    overflow-wrap: break-word;
}

/* CTA — course access button */
.gha-thankyou-cta {
    text-align: center;
    margin-bottom: 32px;
}

.gha-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 28px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: var(--gha-radius-sm);
    transition: all 0.15s ease;
    cursor: pointer;
    border: none;
}

.gha-btn-primary {
    background: var(--gha-primary);
    color: var(--gha-white) !important;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.25);
}

.gha-btn-primary:hover {
    background: var(--gha-primary-hover);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.35);
}

.gha-btn-secondary {
    background: var(--gha-white);
    color: var(--gha-text) !important;
    border: 1px solid var(--gha-border);
}

.gha-btn-secondary:hover {
    border-color: var(--gha-border-hover);
    background: var(--gha-bg-hover);
}

/* Failed payment actions */
.gha-thankyou-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

/* Order details table (injected by woocommerce_thankyou hook) */
.gha-thankyou-wrap .woocommerce-order-details {
    background: var(--gha-white);
    border: 1px solid var(--gha-border);
    border-radius: var(--gha-radius-sm);
    box-shadow: var(--gha-shadow-sm);
    overflow: hidden;
    margin-bottom: 24px;
}

.gha-thankyou-wrap .woocommerce-order-details__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gha-text);
    margin: 0;
    padding: 16px 20px;
    background: var(--gha-bg);
    border-bottom: 1px solid var(--gha-border);
}

.gha-thankyou-wrap .woocommerce-table--order-details {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 0 !important;
    border: none !important;
}

.gha-thankyou-wrap .woocommerce-table--order-details th,
.gha-thankyou-wrap .woocommerce-table--order-details td {
    padding: 12px 20px;
    border: none !important;
    border-bottom: 1px solid var(--gha-border) !important;
    font-size: 14px;
    color: var(--gha-text);
}

.gha-thankyou-wrap .woocommerce-table--order-details thead th {
    font-size: 11px;
    font-weight: 600;
    color: var(--gha-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gha-bg);
}

.gha-thankyou-wrap .woocommerce-table--order-details .product-name {
    font-weight: 500;
}

.gha-thankyou-wrap .woocommerce-table--order-details .product-total {
    text-align: right;
}

.gha-thankyou-wrap .woocommerce-table--order-details tfoot th {
    font-weight: 500;
    color: var(--gha-text-secondary);
}

.gha-thankyou-wrap .woocommerce-table--order-details tfoot td {
    font-weight: 600;
    text-align: right;
}

.gha-thankyou-wrap .woocommerce-table--order-details tr:last-child th,
.gha-thankyou-wrap .woocommerce-table--order-details tr:last-child td {
    border-bottom: none !important;
}

/* "Commander une nouvelle fois" button */
.gha-thankyou-wrap .woocommerce-order-details + .order-again,
.gha-thankyou-wrap .order-again {
    text-align: center;
    margin: 16px 0 24px;
}

.gha-thankyou-wrap .order-again .button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gha-text) !important;
    background: var(--gha-white);
    border: 1px solid var(--gha-border) !important;
    border-radius: var(--gha-radius-sm);
    text-decoration: none !important;
    transition: all 0.15s ease;
}

.gha-thankyou-wrap .order-again .button:hover {
    border-color: var(--gha-border-hover) !important;
    background: var(--gha-bg-hover);
}

/* Customer details (billing/shipping address) */
.gha-thankyou-wrap .woocommerce-customer-details {
    background: var(--gha-white);
    border: 1px solid var(--gha-border);
    border-radius: var(--gha-radius-sm);
    box-shadow: var(--gha-shadow-sm);
    padding: 20px;
    margin-bottom: 24px;
}

.gha-thankyou-wrap .woocommerce-customer-details .woocommerce-column__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gha-text);
    margin: 0 0 12px 0;
}

.gha-thankyou-wrap .woocommerce-customer-details address {
    font-style: normal;
    font-size: 14px;
    color: var(--gha-text-secondary);
    line-height: 1.6;
}

.gha-thankyou-wrap .woocommerce-customer-details address p {
    margin: 0;
}

/* Responsive — stack on mobile */
@media (max-width: 640px) {
    .gha-thankyou-wrap {
        padding: 24px 16px 40px;
    }

    .gha-thankyou-icon {
        width: 52px;
        height: 52px;
        font-size: 24px;
    }

    .gha-thankyou-title {
        font-size: 20px;
    }

    .gha-thankyou-details {
        grid-template-columns: 1fr !important;
    }

    .gha-thankyou-details li {
        border-right: none;
        border-bottom: 1px solid var(--gha-border);
        padding: 12px 16px !important;
    }

    .gha-thankyou-details li.email {
        grid-column: span 1;
    }

    .gha-thankyou-details li:last-child {
        border-bottom: none;
    }

    .gha-thankyou-actions {
        flex-direction: column;
        align-items: center;
    }

    .gha-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   PRIVACY & TERMS
   ========================================================================== */
.woocommerce-privacy-policy-text {
    font-size: 12px !important;
    color: var(--gha-text-light) !important;
    margin-bottom: 20px !important;
    line-height: 1.6 !important;
}

.woocommerce-privacy-policy-text a {
    color: var(--gha-primary) !important;
    text-decoration: underline !important;
}

.woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 20px !important;
}

.woocommerce-form__label-for-checkbox {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-size: 12px !important;
    color: var(--gha-text-secondary) !important;
    cursor: pointer !important;
    line-height: 1.4 !important;
}

.woocommerce-form__label-for-checkbox input {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    accent-color: var(--gha-primary) !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

.woocommerce-form__label-for-checkbox a {
    color: var(--gha-primary) !important;
    text-decoration: underline !important;
}

/* Shorter text for terms checkbox to fit on one line */
.woocommerce-terms-and-conditions-checkbox-text {
    font-size: 12px !important;
    white-space: nowrap !important;
}

/* ==========================================================================
   EMPTY CART STATE
   ========================================================================== */
.cart-empty {
    text-align: center !important;
    padding: 80px 40px !important;
    background: var(--gha-white) !important;
    border-radius: var(--gha-radius) !important;
    box-shadow: var(--gha-shadow) !important;
}

.cart-empty::before {
    content: "🛒";
    display: block;
    font-size: 64px;
    margin-bottom: 24px;
}

.return-to-shop a {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 16px 32px !important;
    background: var(--gha-primary) !important;
    color: var(--gha-white) !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-radius: var(--gha-radius) !important;
    transition: all 0.2s !important;
    margin-top: 24px !important;
}

.return-to-shop a:hover {
    background: var(--gha-primary-hover) !important;
    transform: translateY(-2px) !important;
}

/* ==========================================================================
   RESPONSIVE - Mobile First
   ========================================================================== */
@media (max-width: 900px) {
    .gha-cart-container {
        grid-template-columns: 1fr 280px !important;
        gap: 24px !important;
    }

    .gha-checkout-container {
        grid-template-columns: 1fr 300px !important;
        gap: 24px !important;
    }
}

@media (max-width: 768px) {
    .gha-cart-wrap,
    .gha-checkout-wrap {
        padding: 20px 16px !important;
    }

    .gha-cart-container,
    .gha-checkout-container {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Reset grid placement for mobile */
    .gha-cart-container > .gha-cart-products,
    .gha-cart-container > .gha-cart-summary,
    .gha-checkout-container > .gha-checkout-form-column,
    .gha-checkout-container > .gha-checkout-summary {
        grid-column: 1 !important;
        grid-row: auto !important;
    }

    .gha-cart-summary,
    .gha-checkout-summary {
        position: static !important;
    }

    .gha-checkout-progress {
        padding: 12px 16px !important;
    }

    .gha-progress-step:not(:last-child)::after {
        width: 24px !important;
    }

    .gha-progress-label {
        font-size: 11px !important;
    }

    .gha-progress-number {
        width: 24px !important;
        height: 24px !important;
        font-size: 11px !important;
    }
}

@media (max-width: 480px) {
    .gha-cart-wrap,
    .gha-checkout-wrap {
        padding: 16px 12px !important;
    }

    .gha-cart-title,
    .gha-checkout-title {
        font-size: 20px !important;
    }

    .gha-cart-product {
        padding: 12px !important;
        gap: 12px !important;
    }

    .gha-cart-product-image {
        width: 60px !important;
    }

    .gha-cart-product-image img {
        width: 60px !important;
        height: 45px !important;
    }

    .gha-cart-product-title {
        font-size: 13px !important;
    }

    .gha-cart-product-price {
        font-size: 14px !important;
    }

    .woocommerce-billing-fields__field-wrapper,
    .woocommerce-shipping-fields__field-wrapper {
        grid-template-columns: 1fr !important;
    }

    .form-row-first,
    .form-row-last {
        grid-column: 1 !important;
    }

    .gha-section-body {
        padding: 14px !important;
    }

    .gha-section-header {
        padding: 10px 14px !important;
    }

    .gha-trust-badges {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: center !important;
    }

    .gha-checkout-progress {
        gap: 4px !important;
    }

    .gha-progress-step:not(:last-child)::after {
        width: 16px !important;
        margin-left: 4px !important;
    }
}

/* ==========================================================================
   ANIMATIONS - Subtle & Premium
   ========================================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.gha-cart-product,
.gha-section-card {
    animation: fadeIn 0.3s ease-out;
}

/* Loading state */
.woocommerce .blockUI.blockOverlay {
    background: rgba(255, 255, 255, 0.8) !important;
}

.woocommerce .blockUI.blockOverlay::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid var(--gha-border);
    border-top-color: var(--gha-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
