/* Palette harmonisee avec TikAp M-Inside / TikAp Annuaire :
   Bleu principal #305678, bleu profond #234660, titres #183b56.
   Les changements restent strictement limites aux cartes annotees par ce plugin. */
/* THERATEX / TikAp Reco : extension de presentation uniquement.
   Les classes thx-... sont ajoutees aux cartes reellement presentes ;
   aucune autre carte du theme, de WooCommerce ou de temoignages n'est affectee. */

/* 1. Etape de choix : les photos, cartes et textes sont plus lisibles. */
.thx-reco-choice-card {
    min-height: 228px !important;
    padding: 18px !important;
    gap: 18px !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
}
.thx-reco-choice-card .thx-reco-choice-media {
    flex: 0 0 182px !important;
    width: 182px !important;
    max-width: 43% !important;
    min-width: 0 !important;
    height: 182px !important;
    max-height: none !important;
    overflow: hidden !important;
    border-radius: 13px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}
.thx-reco-choice-card .thx-reco-choice-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
}
/* Pour les cartes ou l'image est un enfant direct, sans cadre media. */
.thx-reco-choice-card > img.thx-reco-choice-image {
    flex: 0 0 182px !important;
    width: 182px !important;
    max-width: 43% !important;
    height: 182px !important;
}
.thx-reco-choice-card .thx-reco-choice-title {
    font-size: 19px !important;
    line-height: 1.24 !important;
    font-weight: 800 !important;
    letter-spacing: -.012em;
}
.thx-reco-choice-card .thx-reco-choice-description {
    font-size: 13px !important;
    line-height: 1.55 !important;
}

/* 2. Produits conseilles : image a bord complet sans vide lateral. */
.trx-product-card.thx-reco-product-enhanced .thx-reco-product-media {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: clamp(305px, 24vw, 390px) !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
}
.trx-product-card.thx-reco-product-enhanced .thx-reco-product-media .thx-reco-media-inner {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}
.trx-product-card.thx-reco-product-enhanced img.thx-reco-product-photo {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 0 !important;
}
/* Cas limite : la photo se trouve directement dans .trx-product-card. */
.trx-product-card.thx-reco-product-enhanced > img.thx-reco-product-photo {
    height: clamp(305px, 24vw, 390px) !important;
}

/* Cartes compactes : pas de photos ecrasant les textes sur mobile. */
@media (max-width: 760px) {
    .thx-reco-choice-card {
        min-height: 192px !important;
        padding: 15px !important;
        gap: 14px !important;
    }
    .thx-reco-choice-card .thx-reco-choice-media,
    .thx-reco-choice-card > img.thx-reco-choice-image {
        flex-basis: 145px !important;
        width: 145px !important;
        height: 148px !important;
        max-width: 45% !important;
    }
    .thx-reco-choice-card .thx-reco-choice-title { font-size: 17px !important; }
    .thx-reco-choice-card .thx-reco-choice-description { font-size: 12px !important; }
    .trx-product-card.thx-reco-product-enhanced .thx-reco-product-media,
    .trx-product-card.thx-reco-product-enhanced > img.thx-reco-product-photo {
        height: clamp(250px, 55vw, 360px) !important;
    }
}
@media (max-width: 430px) {
    .thx-reco-choice-card {
        min-height: 160px !important;
        padding: 12px !important;
        gap: 11px !important;
        border-radius: 14px !important;
    }
    .thx-reco-choice-card .thx-reco-choice-media,
    .thx-reco-choice-card > img.thx-reco-choice-image {
        flex-basis: 112px !important;
        width: 112px !important;
        height: 126px !important;
        max-width: 40% !important;
    }
    .thx-reco-choice-card .thx-reco-choice-title { font-size: 16px !important; }
    .thx-reco-choice-card .thx-reco-choice-description { font-size: 11px !important; }
    .trx-product-card.thx-reco-product-enhanced .thx-reco-product-media,
    .trx-product-card.thx-reco-product-enhanced > img.thx-reco-product-photo {
        height: 285px !important;
    }
}

/* 3. Couleurs THERATEX : cartes Personne / Animal et recommandations.
   Ne pas surcharger les autres elements du moteur de recommandations. */
.thx-reco-choice-card {
    background-color: #fff !important;
    border: 1px solid #dce5ed !important;
    box-shadow: 0 8px 24px rgba(48,86,120,.055) !important;
    transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
}
.thx-reco-choice-card:is(:hover, :focus-visible, :focus-within) {
    border-color: #305678 !important;
    box-shadow: 0 12px 28px rgba(48,86,120,.13) !important;
}
.thx-reco-choice-card:focus-visible {
    outline: 3px solid #8faec8 !important;
    outline-offset: 3px;
}
.thx-reco-choice-card .thx-reco-choice-media {
    background: #f5f8fa !important;
}
.thx-reco-choice-card .thx-reco-choice-title {
    color: #183b56 !important;
}
.thx-reco-choice-card .thx-reco-choice-description {
    color: #5b7182 !important;
}
.trx-product-card.thx-reco-product-enhanced {
    border-color: #dce5ed !important;
    background-color: #fff !important;
    box-shadow: 0 9px 28px rgba(48,86,120,.065);
}
.trx-product-card.thx-reco-product-enhanced :is(h2, h3, h4) {
    color: #183b56 !important;
}
.trx-product-card.thx-reco-product-enhanced :is(.trx-product-price, .trx-price) {
    color: #305678 !important;
}
/* Ne recolorer que les vrais boutons d'action, pas les selecteurs de tailles/variations. */
.trx-product-card.thx-reco-product-enhanced :is(.trx-add-to-cart, .trx-product-cta, button[type="submit"]) {
    background: #305678 !important;
    border-color: #305678 !important;
    color: #fff !important;
}
.trx-product-card.thx-reco-product-enhanced :is(.trx-add-to-cart, .trx-product-cta, button[type="submit"]):hover {
    background: #234660 !important;
    border-color: #234660 !important;
}
.trx-product-card.thx-reco-product-enhanced :is(.trx-add-to-cart, .trx-product-cta, button[type="submit"]):focus-visible {
    outline: 3px solid #8faec8 !important;
    outline-offset: 3px;
}
