/*
Theme Name: agromentis
Theme URI: https://www.portotheme.com/wordpress/porto
Author: P-THEMES
Author URI: https://www.portotheme.com/
Description: Porto Responsive WordPress + eCommerce Theme.
Version: 1.1
Template: porto
License: Commercial
License URI: http://themeforest.net/licenses/regular_extended
Tags: woocommerce, corporate, ecommerce, responsive, blue, black, green, white, light, dark, red, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, fixed-layout, responsive-layout, custom-menu, editor-style, featured-images, flexible-header, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready, accessibility-ready
*/

/*************** ADD YOUR CUSTOM CSS HERE  ***************/

/* Message de stock personnalisé (Style Porto) */
.agromentis-stock-status {
    color: #e3342f; /* Rouge standard pour l'alerte */
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 20px;
    padding: 10px 15px;
    border: 1px solid #e3342f;
    background-color: #fcebea;
    border-radius: 4px;
    display: inline-block;
    width: 100%;
    text-align: center;
}

/* ============================================
   RÉCAPITULATIFS DE COMMANDE PERSONNALISÉS
   ============================================ */

/* === RÉCAPITULATIF PANIER === */
.cart_totals h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

.order-recap-custom {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e5e5e5;
}

.recap-product-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ddd;
}

.recap-product-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recap-product-name,
.recap-product-price {
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 15px;
}

.recap-product-name strong,
.recap-product-price strong {
    display: inline-block;
    min-width: 120px;
    color: #555;
}

.recap-quantity {
    color: #666;
    font-size: 0.95em;
}

.subscription-period {
    font-weight: 600;
    color: #1d3a1e;
}

.price-ht {
    font-size: 0.85em;
    color: #999;
    font-weight: normal;
}

.recap-product-variation {
    margin-top: 5px;
    padding-left: 120px;
    font-size: 0.9em;
    color: #777;
}

.cart-subtotal-custom {
    margin-bottom: 20px;
}

.shop_table_recap {
    width: 100%;
    border-collapse: collapse;
}

.shop_table_recap th,
.shop_table_recap td {
    padding: 12px 15px;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
}

.shop_table_recap .order-total th,
.shop_table_recap .order-total td {
    font-size: 1.2em;
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
    padding-top: 15px;
    padding-bottom: 15px;
}

.subscription-info-recap {
    background: #F7F1E1;
    padding: 15px 20px;
    border-radius: 6px;
    border-left: 4px solid #1d3a1e;
    margin-top: 20px;
}

.subscription-info-recap p {
    margin: 5px 0;
    line-height: 1.6;
}

.subscription-info-recap small {
    color: #666;
}

/* === RÉCAPITULATIF CHECKOUT === */
.order-recap-header h3 {
    font-size: 1.5em;
    margin-bottom: 25px;
    color: #333;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #1d3a1e;
}

.order-recap-products {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e5e5e5;
}

.recap-checkout-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ddd;
}

.recap-checkout-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.product-name-section,
.product-price-section {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.product-name-label,
.product-price-label {
    min-width: 120px;
    flex-shrink: 0;
    font-weight: 600;
    color: #555;
}

.product-name-value,
.product-price-value {
    flex: 1;
    line-height: 1.6;
}

.product-quantity {
    color: #666;
}

.price-type-ht {
    font-size: 0.85em;
    color: #999;
    font-weight: normal;
}

.order-recap-totals {
    margin-bottom: 20px;
}

.totals-table {
    width: 100%;
    border-collapse: collapse;
}

.totals-table th,
.totals-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
}

.totals-table td {
    text-align: right;
}

.totals-table .order-total th,
.totals-table .order-total td {
    font-size: 1.1em;
    border-top: none !important;
    border-left: 4px solid #1d3a1e !important;
    padding-top: 15px;
    padding-bottom: 15px;
    background: #f7f1e1;
    border-radius: 6px;
}

.subscription-info-checkout {
    background: #f7f1e1;
    padding: 18px 20px;
    border-radius: 6px;
    border-left: 4px solid #1d3a1e;
    margin-top: 20px;
}

.subscription-recurring,
.subscription-next-payment {
    margin: 8px 0;
    line-height: 1.8;
    font-size: 15px;
}

/* === PAGE CONFIRMATION COMMANDE (THANK YOU) === */
.order-recap-thank-you-header h2 {
    font-size: 1.6em;
    margin-bottom: 25px;
    color: #333;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #1d3a1e;
}

.order-recap-thank-you-products {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e5e5e5;
}

.recap-thank-you-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #ddd;
}

.recap-thank-you-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.product-name-section-ty,
.product-price-section-ty {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.product-name-label-ty,
.product-price-label-ty {
    min-width: 120px;
    flex-shrink: 0;
    font-weight: 600;
    color: #555;
}

.product-name-value-ty,
.product-price-value-ty {
    flex: 1;
    line-height: 1.6;
}

.product-purchase-note {
    margin-top: 10px;
    padding: 10px;
    background: #fff9e6;
    border-left: 3px solid #f0ad4e;
    border-radius: 4px;
    font-size: 0.9em;
}

.order-recap-thank-you-totals {
    margin-bottom: 20px;
}

.totals-table-ty {
    width: 100%;
    border-collapse: collapse;
}

.totals-table-ty th,
.totals-table-ty td {
    padding: 12px 15px;
    border-bottom: 1px solid #e5e5e5;
    text-align: left;
}

.totals-table-ty td {
    text-align: right;
}

.totals-table-ty .order-total th,
.totals-table-ty .order-total td {
    font-size: 1.4em;
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
    padding-top: 15px;
    padding-bottom: 15px;
    background: #e7f7e7;
}

.subscription-info-thank-you {
    background: #f7f1e1;
    padding: 18px 20px;
    border-radius: 6px;
    border-left: 4px solid #1d3a1e;
    margin-top: 20px;
}

.subscription-info-thank-you .subscription-recurring,
.subscription-info-thank-you .subscription-next-payment {
    margin: 8px 0;
    line-height: 1.8;
    font-size: 15px;
}

.subscription-info-thank-you .subscription-manage {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #c4b89a;
}

.subscription-info-thank-you .subscription-manage a {
    color: #1d3a1e;
    font-weight: 600;
    text-decoration: underline;
}

.subscription-info-thank-you .subscription-manage a:hover {
    color: #0f1f0f;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .recap-product-name strong,
    .recap-product-price strong,
    .product-name-label,
    .product-price-label {
        min-width: 100px;
        font-size: 0.9em;
    }

    .order-recap-header h3 {
        font-size: 1.3em;
    }

    .product-name-section,
    .product-price-section {
        flex-direction: column;
    }

    .product-name-label,
    .product-price-label {
        margin-bottom: 5px;
    }
}

/* ============================================
   MASQUER LES REDONDANCES WOOCOMMERCE SUBSCRIPTIONS
   ============================================ */

/* Masquer les totaux récurrents ajoutés par WooCommerce Subscriptions 
   Sauf pour la TVA qu'on veut garder visible */
.woocommerce-checkout-review-order-table tr.recurring-total:not(.tax-rate),
.woocommerce-checkout-review-order-table tr.recurring-totals,
.woocommerce-checkout-review-order-table .cart-subtotal.recurring-total,
.woocommerce-checkout-review-order-table .order-total.recurring-total {
    display: none !important;
}

/* Idem pour le panier */
.cart_totals tr.recurring-total:not(.tax-rate),
.cart_totals tr.recurring-totals {
    display: none !important;
}

/* ============================================
   MASQUER LES MESSAGES D'ERREUR INLINE
   ============================================ */
/* L'utilisateur souhaite voir uniquement le message d'erreur global en haut de page.
   On masque donc les messages d'erreur sous les champs, notamment les checkboxes */

.woocommerce-checkout .woocommerce-invalid .woocommerce-error,
.woocommerce-checkout .woocommerce-invalid .woocommerce-error-message,
.woocommerce-checkout .woocommerce-error-message,
/* Target standard WC invalid field error message inside form rows */
.woocommerce .woocommerce-invalid-required-field .woocommerce-error,
.woocommerce .form-row.woocommerce-invalid .woocommerce-error,
.woocommerce-checkout .form-row .woocommerce-error {
	display: none !important;
}
