/* =====================================================================
   DESIGN SYSTEM SMART RENEW - règles globales, chargées en dernier
   pour garantir la cohérence sur TOUTES les pages (panier, commande,
   adresses, compte, filtres...), sans avoir à corriger page par page.
   ===================================================================== */

:root {
    --sr-cream: #F8F4ED;
    --sr-cream-2: #eef3e4;
    --sr-blue: #2E5984;
    --sr-green: #6FA743;
    --sr-green-dark: #5A8C35;
    --sr-radius: 28px;
    --sr-radius-sm: 14px;
    --sr-shadow: 0 12px 34px rgba(46, 89, 132, 0.09);
}

/* ===== TOUS LES CHAMPS DE SAISIE DU SITE ===== */
/* (panier, commande, adresses, compte, filtres, avis, recherche...) */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout input[type="password"],
.woocommerce-checkout select,
.woocommerce-checkout textarea,
.woocommerce-EditAccountForm input[type="text"],
.woocommerce-EditAccountForm input[type="email"],
.woocommerce-EditAccountForm input[type="password"],
.woocommerce-address-fields input[type="text"],
.woocommerce-address-fields select,
#order_comments,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    background: var(--sr-cream) !important;
    border: 2px solid rgba(111, 167, 67, 0.25) !important;
    border-radius: var(--sr-radius-sm) !important;
    padding: 12px 16px !important;
    color: var(--sr-blue) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus,
.woocommerce-checkout input:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus,
.woocommerce-EditAccountForm input:focus,
.woocommerce-address-fields input:focus,
.woocommerce-address-fields select:focus,
#order_comments:focus,
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none !important;
    border-color: var(--sr-green) !important;
    box-shadow: 0 0 0 4px rgba(111, 167, 67, 0.15) !important;
}

.woocommerce form .form-row label,
.woocommerce-address-fields label,
.woocommerce-EditAccountForm label {
    color: var(--sr-blue) !important;
    font-weight: 700 !important;
    font-size: 14px !important;
}

/* ===== TOUS LES BOUTONS PRINCIPAUX DU SITE ===== */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #place_order,
.woocommerce-checkout #place_order,
.woocommerce a.checkout-button,
.woocommerce-cart .button[name="update_cart"],
.woocommerce-cart .checkout-button {
    background: var(--sr-green) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 14px 30px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 20px rgba(111, 167, 67, 0.25);
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #place_order:hover,
.woocommerce a.checkout-button:hover {
    background: var(--sr-green-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(111, 167, 67, 0.35);
}

/* ===== TOUTES LES GRANDES CARTES / BLOCS DU SITE ===== */
/* (panier, tableau récapitulatif commande, adresses...) */
.woocommerce-cart table.shop_table,
.woocommerce-checkout table.shop_table,
.woocommerce-cart .cart-collaterals .cart_totals,
.woocommerce-checkout #order_review,
.woocommerce-Addresses .woocommerce-Address,
.woocommerce-order-details,
.woocommerce-customer-details {
    background: var(--sr-cream) !important;
    border-radius: var(--sr-radius) !important;
    padding: 30px !important;
    border: none !important;
    box-shadow: var(--sr-shadow) !important;
}

.woocommerce-Addresses.woocommerce-columns,
.u-columns.woocommerce-Addresses {
    display: flex !important;
    flex-wrap: wrap;
    gap: 24px;
    width: 100% !important;
}

.woocommerce-Addresses .woocommerce-Address,
.u-columns.woocommerce-Addresses .u-column1,
.u-columns.woocommerce-Addresses .u-column2 {
    flex: 1 1 280px;
    min-width: 280px;
    width: auto !important;
    margin-bottom: 20px !important;
}

.woocommerce-Address-title {
    background: transparent !important;
}

.woocommerce-Address-title h2,
.woocommerce-Address-title h3 {
    background: transparent !important;
    white-space: normal !important;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 18px !important;
}

.woocommerce table.shop_table thead,
.woocommerce table.shop_table thead tr,
.woocommerce table.shop_table thead th,
table.my_account_orders thead,
table.my_account_orders thead tr,
table.my_account_orders thead th,
.woocommerce-order-details table thead,
.woocommerce-order-details table thead th {
    background: transparent !important;
}

.woocommerce table.shop_table {
    width: 100% !important;
    font-size: 16px !important;
}

.woocommerce-cart table.shop_table th,
.woocommerce-checkout table.shop_table th,
.woocommerce-orders-table th,
table.my_account_orders th {
    color: var(--sr-blue) !important;
    border-bottom: 2px solid rgba(111, 167, 67, 0.2) !important;
    font-size: 15px !important;
    padding: 14px 12px !important;
}

.woocommerce-cart table.shop_table td,
.woocommerce-checkout table.shop_table td,
.woocommerce-orders-table td,
table.my_account_orders td {
    border-bottom: 1px solid rgba(111, 167, 67, 0.12) !important;
    padding: 16px 12px !important;
    font-size: 15px !important;
}

table.my_account_orders .button {
    padding: 8px 18px !important;
    font-size: 13px !important;
}

/* ===== FORCE LA LARGEUR DE LA ZONE COMPTE (dernier mot, priorité maximale) ===== */
body.woocommerce-account .entry-content,
body.woocommerce-account div.woocommerce {
    max-width: 1300px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

@media (min-width: 768px) {
    body.woocommerce-account div.woocommerce {
        display: flex !important;
        width: 100% !important;
        gap: 30px !important;
    }

    body.woocommerce-account nav.woocommerce-MyAccount-navigation {
        flex: 0 0 320px !important;
        max-width: 320px !important;
        width: 320px !important;
    }

    body.woocommerce-account .woocommerce-MyAccount-content {
        flex: 1 1 auto !important;
        max-width: none !important;
        width: auto !important;
    }
}

/* ===== PAGE "VOIR LA COMMANDE" - largeur et adresses cassées ===== */
.woocommerce-order-details,
.woocommerce-order-downloads,
.woocommerce-columns--addresses,
.woocommerce-customer-details {
    width: 100% !important;
    max-width: 100% !important;
}

.woocommerce-columns--addresses {
    display: flex !important;
    flex-wrap: wrap;
    gap: 24px;
}

.woocommerce-columns--addresses .woocommerce-column {
    flex: 1 1 280px;
    min-width: 280px;
    width: auto !important;
    background: var(--sr-cream) !important;
    border-radius: var(--sr-radius-sm) !important;
    padding: 20px !important;
    box-shadow: var(--sr-shadow);
}

.woocommerce-columns--addresses .woocommerce-column h2,
.woocommerce-columns--addresses .woocommerce-column h3 {
    color: var(--sr-blue) !important;
    font-size: 18px !important;
    white-space: normal;
}

/* Le contenu du tableau de bord peut prendre plus de place */
.woocommerce-MyAccount-content {
    font-size: 16px !important;
}

/* Titres de section cohérents partout */
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout h3,
.cart_totals h2,
.woocommerce-Addresses h2,
.woocommerce-order-details h2,
.woocommerce-customer-details h2 {
    color: var(--sr-blue) !important;
    font-weight: 800 !important;
}

@media (max-width: 768px) {
    .woocommerce-cart table.shop_table,
    .woocommerce-checkout table.shop_table,
    .woocommerce-cart .cart-collaterals .cart_totals,
    .woocommerce-checkout #order_review,
    .woocommerce-Addresses .woocommerce-Address,
    .woocommerce-order-details,
    .woocommerce-customer-details {
        padding: 20px !important;
        border-radius: 20px !important;
    }
}
