/* Styles personnalisés pour les pages WooCommerce (panier et validation de commande) */

/* Appliquer la couleur #333333 à la section principale du contenu */
.woocommerce-cart #content.site-content,
.woocommerce-checkout #content.site-content,
.woocommerce-cart .main-content.boxed-wrapper,
.woocommerce-checkout .main-content.boxed-wrapper {
    background-color: #1c1d21;
    color: #ffffff;
}

/* Fond de page et texte */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
    background-color: #1c1d21;
    color: #ffffff;
    padding: 30px 0;
}

/* Titres */
.woocommerce-cart h1, .woocommerce-cart h2, .woocommerce-cart h3,
.woocommerce-checkout h1, .woocommerce-checkout h2, .woocommerce-checkout h3 {
    color: #ffffff;
    font-weight: bold;
    background-image: linear-gradient(to right, #0080ff 40%, #5040c8 50%, #8a2be2 60%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* Tableaux */
.woocommerce table.shop_table {
    background-color: #1c1d21;
    border-radius: 10px;
    border: none;
}

.woocommerce table.shop_table th {
    background-color: #171819;
    color: #ffffff;
    padding: 15px;
    font-weight: bold;
    border-top: none;
}

.woocommerce table.shop_table td {
    color: #cccccc;
    padding: 15px;
    border-top: 1px solid #262830;
}

/* Boutons */
.woocommerce #respond input#submit, 
.woocommerce a.button, 
.woocommerce button.button, 
.woocommerce input.button,
.woocommerce #respond input#submit.alt, 
.woocommerce a.button.alt, 
.woocommerce button.button.alt, 
.woocommerce input.button.alt {
    background: linear-gradient(to right, #0080ff, #8a2be2);
    color: #ffffff;
    font-weight: bold;
    border-radius: 5px;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.woocommerce #respond input#submit:hover, 
.woocommerce a.button:hover, 
.woocommerce button.button:hover, 
.woocommerce input.button:hover,
.woocommerce #respond input#submit.alt:hover, 
.woocommerce a.button.alt:hover, 
.woocommerce button.button.alt:hover, 
.woocommerce input.button.alt:hover {
    background: linear-gradient(to right, #0070e0, #7a1bd2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 128, 255, 0.3);
    color: #ffffff;
}

/* Inputs et sélecteurs */
.woocommerce form .form-row input.input-text, 
.woocommerce form .form-row textarea,
.select2-container--default .select2-selection--single {
    background-color: #1c1d21;
    color: #ffffff;
    border: 1px solid #262830;
    border-radius: 5px;
    padding: 10px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #ffffff;
}

.select2-dropdown {
    background-color: #1c1d21;
    border: 1px solid #262830;
}

.select2-container--default .select2-results__option[data-selected=true] {
    background-color: #0080ff;
}

.select2-container--default .select2-results__option--highlighted[data-selected] {
    background-color: #8a2be2;
}

/* Messages */
.woocommerce-message, 
.woocommerce-info {
    border-top-color: #0080ff;
    background-color: #1c1d21;
    color: #ffffff;
}

.woocommerce-message::before, 
.woocommerce-info::before {
    color: #0080ff;
}

.woocommerce-error {
    border-top-color: #ff4040;
    background-color: #1c1d21;
    color: #ffffff;
}

.woocommerce-error::before {
    color: #ff4040;
}

/* Coupon */
.woocommerce-cart table.cart td.actions .coupon .input-text {
    background-color: #1c1d21;
    color: #ffffff;
    border: 1px solid #262830;
    padding: 10px 15px;
    width: 120px;
}

/* Totaux */
.woocommerce-cart .cart-collaterals .cart_totals,
.woocommerce-checkout .order_details,
.woocommerce-checkout .woocommerce-order-details,
.woocommerce-checkout .woocommerce-customer-details {
    background-color: #1c1d21;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Quantité */
.woocommerce .quantity .qty {
    background-color: #1c1d21;
    color: #ffffff;
    border: 1px solid #262830;
    border-radius: 5px;
    padding: 8px;
}

/* Notices */
.woocommerce-notices-wrapper {
    background-color: #1c1d21;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Champs d'adresse */
.woocommerce-checkout .col2-set {
    background-color: #1c1d21;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

/* Labels */
.woocommerce form .form-row label {
    color: #ffffff;
    font-weight: 500;
}

/* Paiement */
#add_payment_method #payment, 
.woocommerce-cart #payment, 
.woocommerce-checkout #payment {
    background-color: #1c1d21;
    border-radius: 10px;
}

#add_payment_method #payment div.payment_box, 
.woocommerce-cart #payment div.payment_box, 
.woocommerce-checkout #payment div.payment_box {
    background-color: #171819;
    color: #cccccc;
}

#add_payment_method #payment div.payment_box::before, 
.woocommerce-cart #payment div.payment_box::before, 
.woocommerce-checkout #payment div.payment_box::before {
    border-bottom-color: #171819;
}

#add_payment_method #payment ul.payment_methods, 
.woocommerce-cart #payment ul.payment_methods, 
.woocommerce-checkout #payment ul.payment_methods {
    border-bottom: 1px solid #262830;
}

/* Page "Merci" */
.woocommerce-order-received .woocommerce-thankyou-order-received {
    background-image: linear-gradient(to right, #0080ff 40%, #5040c8 50%, #8a2be2 60%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 30px;
}

/* Assurer que la couleur de fond principale est partout */
.woocommerce-page .site-content,
.woocommerce-account .site-content,
.woocommerce-cart .site-content,
.woocommerce-checkout .site-content {
    background-color: #333333;
}

/* Styles supplémentaires pour assurer la cohérence */
body.woocommerce-page {
    background-color: #333333;
}

.woocommerce ul.products li.product, 
.woocommerce-page ul.products li.product {
    background-color: #1c1d21;
}

/* Ajout d'une légère bordure pour distinguer les éléments */
.woocommerce .woocommerce-ordering select,
.woocommerce div.product form.cart .variations select {
    background-color: #1c1d21;
    color: #ffffff;
    border: 1px solid #262830;
    border-radius: 5px;
}

/* Style uniforme pour tous les conteneurs */
.woocommerce-page .woocommerce,
.woocommerce-page .products,
.woocommerce-page .product {
    background-color: #1c1d21;
}
/* Centrer le bouton "Retour à la boutique" lorsque le panier est vide */
p.return-to-shop {
    text-align: center;
    margin: 30px auto;
    width: 100%;
    display: flex;
    justify-content: center;
}

.return-to-shop .button.wc-backward {
    min-width: 200px;
    text-align: center;
    margin: 0 auto;
    display: inline-block;
}

/* S'assurer que le style s'applique sur tous les écrans */
@media only screen and (max-width: 768px) {
    p.return-to-shop {
        margin: 20px auto;
    }
    
    .return-to-shop .button.wc-backward {
        width: 80%;
        max-width: 300px;
    }
}