/*
Theme Name: Hello Elementor Child
... (tout l'en-tête de votre thème reste identique) ...
*/

/* ========================================================================= */
/* DÉBUT - Correction Page Panier (Block Editor & Classic)
/* ========================================================================= */

.woocommerce-cart .cart_totals,
.wc-block-cart__totals {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

.woocommerce-cart .wc-proceed-to-checkout,
.wc-block-cart__payment-options {
    padding-top: 1em;
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.woocommerce-cart .wc-proceed-to-checkout *,
.wc-block-cart__payment-options > * {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 !important;
}

@media (max-width: 921px) {
    .wp-block-woocommerce-cart { display: block !important; }
    .wp-block-woocommerce-cart > .wc-block-cart__main,
    .wp-block-woocommerce-cart > .wc-block-cart__sidebar {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin-bottom: 2em;
    }
    body.woocommerce-cart .entry-content {
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }
}

/* ========================================================================= */
/* DÉBUT - Style Personnalisé de la Page Panier - Charte Eyrah
/* ========================================================================= */

.woocommerce-cart .entry-title { color: #69343a; }
.woocommerce-cart .product-name a, .woocommerce-cart .product-remove a { color: #69343a; text-decoration: none; }
.woocommerce-cart .product-remove a:hover { color: #FFFFFF; background-color: #69343a; }
.woocommerce-cart .cart-collaterals .cart_totals { background-color: #EEE9EA; border-radius: 12px; padding: 2em; border: 1px solid #D9CCCE; }
.woocommerce-cart .cart-collaterals .cart_totals h2 { color: #69343a; font-size: 1.5em; margin-bottom: 1em; text-align: center; text-transform: uppercase; }
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button { background-color: #69343a !important; color: #FFFFFF !important; border-radius: 8px !important; padding: 15px !important; font-weight: 700 !important; text-align: center !important; line-height: 1.2 !important; transition: background-color 0.3s ease !important; }
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover { background-color: #50272c !important; }
.woocommerce-cart .actions .button { background-color: #FFFFFF !important; color: #69343a !important; border: 2px solid #D9CCCE !important; border-radius: 8px !important; font-weight: 600 !important; }
.woocommerce-cart .actions .button:hover { background-color: #EEE9EA !important; border-color: #69343a !important; }
.woocommerce-cart .coupon .input-text { border: 2px solid #D9CCCE !important; border-radius: 8px !important; padding: 10px 15px !important; }
.woocommerce-cart .coupon .input-text:focus { border-color: #69343a !important; box-shadow: none !important; }

/* ========================================================================= */
/* DÉBUT - Refonte UX de la Page Panier (Mobile)
/* ========================================================================= */

@media (max-width: 767px) {

    /* --- 1. Casser le comportement du tableau --- */
    .woocommerce-cart-form .shop_table,
    .woocommerce-cart-form .shop_table tbody,
    .woocommerce-cart-form .shop_table tr,
    .woocommerce-cart-form .shop_table td {
        display: block;
        width: 100%;
    }

    .woocommerce-cart-form .shop_table thead {
        display: none;
    }

    /* --- 2. Créer la structure en "Carte" pour chaque produit --- */
    .woocommerce-cart-form .shop_table tr.cart_item {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start; /* Aligner en haut pour la cohérence */
        padding: 20px 0;
        border-bottom: 1px solid #e0e0e0;
        position: relative; /* Contexte pour le bouton supprimer */
    }

    .woocommerce-cart-form .shop_table td {
        border: none;
        padding: 0;
        text-align: left !important;
    }

    /* --- 3. Organiser le contenu de la carte --- */

    /* Colonne de gauche : l'image */
    .woocommerce-cart-form .product-thumbnail {
        width: 80px; /* Taille fixe pour l'image */
        flex-shrink: 0;
        padding-right: 15px;
    }

    /* Colonne de droite : les informations */
    .woocommerce-cart-form .product-name {
        flex: 1; /* Prend tout l'espace restant */
        display: flex;
        flex-direction: column; /* Empile les infos verticalement */
        gap: 8px; /* Espace entre le nom, le prix, la quantité */
    }

    .woocommerce-cart-form .product-name a {
        font-size: 1.1em;
        font-weight: bold;
        line-height: 1.3;
    }
    
    /* Le prix unitaire */
    .woocommerce-cart-form .product-price {
        font-size: 1em;
        color: #333;
        font-weight: 600;
    }
    
    /* La quantité */
    .woocommerce-cart-form .product-quantity {
        margin-top: 5px;
    }

    /* Le sous-total : on le cache, il est redondant */
    .woocommerce-cart-form .product-subtotal {
        display: none !important;
    }

    /* Le bouton de suppression : une icône "X" en haut à droite */
    .woocommerce-cart-form .product-remove {
        position: absolute;
        top: 15px;
        right: 0;
        width: 24px;
        height: 24px;
    }
    .woocommerce-cart-form .product-remove a {
        font-size: 18px;
        text-decoration: none;
        color: #9ca3af;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }
    .woocommerce-cart-form .product-remove a:hover {
        color: #FFFFFF;
        background-color: #69343a;
    }
}

/* ========================================================================= */
/* DÉBUT - Style pour le titre de collection superposé
/* ========================================================================= */

/* 1. On prépare le conteneur principal */
.titre-superpose-wrapper {
    position: relative; /* Indispensable pour positionner les enfants */
    text-align: center; /* Centre horizontalement les titres */
    min-height: 100px;  /* Donne un peu d'espace pour éviter que les titres ne soient coupés. Ajustez si besoin. */
}

/* 2. On positionne le titre du premier plan ("Disponible") par-dessus l'autre */
.titre-superpose-wrapper #titre-avant {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%; /* Assure un centrage parfait */
    margin-top: 10px; /* Ajustement vertical fin. Augmentez pour descendre, diminuez pour monter. */
}

/* 3. On crée l'effet de relief/biseau sur les deux titres */
.titre-superpose-wrapper .elementor-heading-title {
    /* Cette technique utilise deux ombres : une claire en haut, une foncée en bas */
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.5), /* Ombre portée foncée pour la profondeur */
        -0.5px -0.5px 1px rgba(255, 255, 255, 0.7); /* Lumière subtile pour simuler le relief */
}

/* ========================================================================= */
/* FIN - Style pour le titre de collection superposé
/* ========================================================================= */