/**
 * Pro HD — Cadeaux du panier : filtre par famille (1.3.0).
 *
 * Charte Pro HD : bleu #0C5DA2, bleu clair #67C6E7, gris de bandeau #EEF2F3,
 * encre #22303F, encre tertiaire #4C6376 (la seule qui passe AA sur le blanc
 * ET sur le gris, arbitrage typographique du 11/09/2026). Pas de vert : la
 * charte n'en a pas.
 */

.prohd-cadeaux-filtre {
    margin: 0 0 16px;
    padding: 0 15px;
    min-width: 0;
    max-width: 100%;
}

.prohd-cadeaux-filtre__titre {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: #22303F;
}

.prohd-cadeaux-filtre__rangee {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 8px;
}

.prohd-cadeaux-filtre__pastille {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 6px 14px;
    border: 1px solid #0C5DA2;
    border-radius: 999px;
    background: #FFFFFF;
    color: #0C5DA2;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.prohd-cadeaux-filtre__pastille:hover {
    background: #EEF2F3;
}

.prohd-cadeaux-filtre__pastille:focus-visible {
    outline: 2px solid #67C6E7;
    outline-offset: 2px;
}

.prohd-cadeaux-filtre__pastille[aria-pressed="true"] {
    background: #0C5DA2;
    color: #FFFFFF;
}

.prohd-cadeaux-filtre__compte {
    font-weight: 400;
    opacity: .8;
}

/* La seconde rangee, les sous-familles : plus discrete, bleu clair. */
.prohd-cadeaux-filtre__pastille--sous {
    padding: 4px 12px;
    border-color: #67C6E7;
    color: #22303F;
    font-size: 12.5px;
}

.prohd-cadeaux-filtre__pastille--sous[aria-pressed="true"] {
    background: #67C6E7;
    color: #22303F;
}

/* Ce que le filtre retire. `!important` : les cartes portent des display
   venus de la grille du theme et de c-cart.css. */
#prohd-cadeaux .prohd-cadeau--filtre,
#prohd-cadeaux ul.idx-product_list.prohd-cadeaux-liste--vide {
    display: none !important;
}

/* La categorie du produit, en tete de la carte. */
.prohd-cadeau__categorie {
    display: block;
    margin: 0 0 4px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.3;
    color: #4C6376;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Telephone : les pastilles tiennent sur une ligne et defilent au doigt,
   plutot que d'empiler quatre rangees avant le premier cadeau. */
@media (max-width: 767.98px) {
    .prohd-cadeaux-filtre {
        padding: 0 8px;
    }
    .prohd-cadeaux-filtre__rangee {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        padding-bottom: 4px;
    }
    .prohd-cadeaux-filtre__pastille {
        flex: 0 0 auto;
    }
    /* La categorie sur la carte coutait ~420 px pour 34 cadeaux (mesure du
       30/09/2026 a 371 px) ; sur telephone les pastilles la donnent deja. */
    .prohd-cadeau__categorie {
        display: none;
    }
}

/* --- Cartes de meme hauteur (1.4.1) --------------------------------------
   Le nom du cadeau occupe TOUJOURS deux lignes, qu'il en ait besoin ou non :
   sinon une carte au nom court mesurait 159 px a cote de cartes de 176 px
   (releve du 01/10/2026 a 1 920 px), et les prix ne s'alignaient plus.
   En em, pour suivre la taille de police du bureau comme du telephone. */

#prohd-cadeaux .idx-product-name {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.25 !important;
    min-height: 2.5em;
}

/* --- Le repli de la liste (1.4.0) ----------------------------------------
   Les cartes au-dela des N premieres lignes, et le bouton qui les deplie.
   Selecteurs renforces et !important : une regle du theme sur les boutons
   (chargee apres cette feuille) retirait le cadre au premier essai. */

#prohd-cadeaux .prohd-cadeau--replie {
    display: none !important;
}

#prohd-cadeaux button.prohd-cadeaux-deplier {
    display: block;
    margin: 4px auto 18px !important;
    padding: 10px 22px !important;
    border: 1px solid #0C5DA2 !important;
    border-radius: 6px !important;
    background: #FFFFFF !important;
    color: #0C5DA2 !important;
    font: inherit;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    text-transform: none !important;
    box-shadow: none !important;
    cursor: pointer;
}

#prohd-cadeaux button.prohd-cadeaux-deplier:hover {
    background: #EEF2F3 !important;
}

#prohd-cadeaux button.prohd-cadeaux-deplier:focus-visible {
    outline: 2px solid #67C6E7;
    outline-offset: 2px;
}

#prohd-cadeaux button.prohd-cadeaux-deplier[hidden] {
    display: none !important;
}

/* Un bouton qui ne suit pas immediatement une liste est un orphelin : il
   reste de la liste qu'idxcartgift vient de retirer, et le script va le
   supprimer. On le masque sans attendre (1.4.2) : sans cette regle, les
   trois boutons s'affichaient empiles pendant ~1 s apres chaque
   modification du panier (mesure du 01/10/2026). */
#prohd-cadeaux > button.prohd-cadeaux-deplier:not(ul.idx-product_list + button) {
    display: none !important;
}

@media (max-width: 767.98px) {
    #prohd-cadeaux button.prohd-cadeaux-deplier {
        width: calc(100% - 16px);
    }
}

/* --- Les nouvelles cartes de cadeaux (1.5.0) -----------------------------
   Sur le modele d'objetrama.fr, demande du 01/10/2026 : nom court, image
   plus haute, prix barre, bouton « Choisir » ; plus de categorie, plus de
   pastille rose, plus de bande « Ajouter un cadeau ! » sur la photo.
   Tout est scope sur `li.prohd-carte`, classe posee par le script seulement
   si « Nouvelles cartes de cadeaux » est a Oui : decocher rend les cartes
   d'origine sans autre geste. !important : ces regles doivent battre la
   grille de c-cart.css (blocs PROHD-CADEAUX-MOBILE et -BUREAU) et le script
   de hierarchie de checkout/cart.tpl. Charte : bleu #0C5DA2, bleu clair
   #67C6E7, gris #EEF2F3, encre #22303F, encre tertiaire #4C6376. */

#prohd-cadeaux ul.idx-product_list > li.prohd-carte {
    padding: 0 7px 14px !important;
    min-height: 0 !important;
    opacity: 1 !important;
}

#prohd-cadeaux li.prohd-carte .idx-product-container {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    min-height: 0 !important;
    padding: 12px 10px !important;
    background: #FFFFFF !important;
    border: 1px solid #DDE5EA !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    transition: box-shadow .15s ease, border-color .15s ease;
}

#prohd-cadeaux li.prohd-carte .idx-product-container:hover {
    border-color: #67C6E7 !important;
    box-shadow: 0 6px 18px rgba(12, 93, 162, .12) !important;
}

#prohd-cadeaux li.prohd-carte .left-block {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

#prohd-cadeaux li.prohd-carte .idx-product-image-container {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 150px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #FFFFFF !important;
}

#prohd-cadeaux li.prohd-carte .idx-product-image-container a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#prohd-cadeaux li.prohd-carte .idx-product-image-container img {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 150px !important;
    object-fit: contain;
}

#prohd-cadeaux li.prohd-carte .idx-content_price,
#prohd-cadeaux li.prohd-carte .free-span-price,
#prohd-cadeaux li.prohd-carte .prohd-cadeau__categorie {
    display: none !important;
}

#prohd-cadeaux li.prohd-carte .right-block {
    display: flex !important;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 0 !important;
    text-align: center;
}

#prohd-cadeaux li.prohd-carte .right-block h5 {
    min-height: 0 !important;
    margin: 10px 0 4px !important;
}

#prohd-cadeaux li.prohd-carte .idx-product-name {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 2.6em;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    color: #22303F !important;
    text-decoration: none !important;
    cursor: pointer;
}

#prohd-cadeaux li.prohd-carte .idx-product-name:hover,
#prohd-cadeaux li.prohd-carte .idx-product-name:focus-visible {
    color: #0C5DA2 !important;
    text-decoration: underline !important;
}

#prohd-cadeaux li.prohd-carte .content_price {
    margin: 0 0 10px !important;
}

#prohd-cadeaux li.prohd-carte .idx-old-price {
    display: inline !important;
    font-size: 13px !important;
    color: #4C6376 !important;
    text-decoration: line-through !important;
}

/* 1.8.3 — Le format offert, devant le prix barre : « Paquet de 12 rlx · 8,30 € ».
   Encre pleine et non barree : c'est ce que le client recoit. */
#prohd-cadeaux li.prohd-carte .prohd-carte__format {
    font-size: 13px;
    font-weight: 600;
    color: #22303F;
}

#prohd-cadeaux li.prohd-carte .prohd-carte__format::after {
    content: "\00a0· ";
    font-weight: 400;
    color: #4C6376;
}

#prohd-cadeaux button.prohd-carte__bouton {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    margin: auto 0 0 !important;
    padding: 9px 10px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #0C5DA2 !important;
    color: #FFFFFF !important;
    font: inherit;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: background-color .15s ease;
}

#prohd-cadeaux button.prohd-carte__bouton:hover {
    background: #0A4C86 !important;
}

#prohd-cadeaux button.prohd-carte__bouton:focus-visible {
    outline: 2px solid #67C6E7;
    outline-offset: 2px;
}

#prohd-cadeaux button.prohd-carte__bouton svg {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#prohd-cadeaux button.prohd-carte__bouton--attente,
#prohd-cadeaux button.prohd-carte__bouton--attente:hover {
    background: #EEF2F3 !important;
    color: #4C6376 !important;
    font-weight: 500 !important;
    cursor: default;
}

/* Telephone : deux cartes par ligne (decision du 01/10/2026), la grille a
   trois par ligne de mobile.css n'etant plus chargee avec ces cartes. */
@media (max-width: 767.98px) {
    #prohd-cadeaux ul.idx-product_list > li.prohd-carte {
        flex: 0 0 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        padding: 0 5px 10px !important;
    }
    #prohd-cadeaux li.prohd-carte .idx-product-image-container {
        height: 115px !important;
    }
    #prohd-cadeaux li.prohd-carte .idx-product-image-container img {
        max-height: 115px !important;
    }
    #prohd-cadeaux li.prohd-carte .idx-product-name {
        font-size: 12.5px !important;
    }
    #prohd-cadeaux button.prohd-carte__bouton {
        padding: 8px !important;
        font-size: 13px !important;
    }
}
