/**
 * CIDFP SEO Taxonomies — Page étiquette dédiée (front).
 * Grille responsive + pagination + intro + card formation.
 *
 * Colonnes pilotées par variables CSS injectées inline sur .cidfp-tseo-tp-wrap
 * (--cidfp-cols-desktop, --cidfp-cols-tablet, --cidfp-cols-mobile).
 *
 * Palette CIDFP (charte cohérente avec Porto child) :
 *   --cidfp-teal        : #199ca4  (primary)
 *   --cidfp-teal-dark   : #137178  (hover)
 *   --cidfp-teal-light  : #e6f6f7  (bg soft)
 *   --cidfp-text        : #1d2327  (heading)
 *   --cidfp-muted       : #666
 *   --cidfp-border      : #e5e5e5
 *   --cidfp-shadow-teal : 0 6px 20px rgba(25, 156, 164, 0.16)
 */

:root, .cidfp-tseo-tp-wrap {
    --cidfp-teal:        #199ca4;
    --cidfp-teal-dark:   #137178;
    --cidfp-teal-light:  #e6f6f7;
    --cidfp-text:        #1d2327;
    --cidfp-muted:       #666;
    --cidfp-border:      #e5e5e5;
    --cidfp-shadow-teal: 0 6px 20px rgba(25, 156, 164, 0.16);
    --cidfp-shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.06);
    --cidfp-radius:      6px;
}

.cidfp-tseo-tp-wrap {
    position: relative;
    margin: 32px auto;
    color: var(--cidfp-text, #1d2327);
    font-family: inherit;                       /* respecte la font Porto */
    /* Charte CIDFP : espacement vertical généreux entre sections */
}

/* ══════════════════════════════════════════════════════════════════════
   Container mode — largeur du bloc sur la page étiquette
   ══════════════════════════════════════════════════════════════════════ */

/* Boxed = largeur explicite alignée sur charte CIDFP (~1200px), centrée.
 * Ne fait PAS de no-op car les pages CPT rendent souvent en pleine largeur
 * dans le template Porto → notre bloc doit s'auto-contraindre. */
.cidfp-tseo-tp-container-boxed {
    max-width: 1200px !important;               /* charte CIDFP - centré */
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: clamp(16px, 3vw, 24px) !important;
    padding-right: clamp(16px, 3vw, 24px) !important;
    box-sizing: border-box !important;
    left: 0 !important;                         /* annule éventuel decal parent */
    right: 0 !important;
}
/* Si le parent est <main> pleine largeur (template CPT Porto par défaut),
 * on centre le bloc grâce au max-width + auto margins ci-dessus.
 * Si le parent applique déjà un container, notre bloc reste dedans. */

/* Full = casse le container : le bloc prend 100vw en s'échappant du parent.
 * Technique moderne : left calc(-50vw + 50%) - fonctionne quelle que soit
 * la largeur du parent (même si <main> a padding, max-width, ou est décentré). */
.cidfp-tseo-tp-container-full {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: calc(50% - 50vw);
    right: calc(50% - 50vw);
    margin-left: 0;
    margin-right: 0;
    padding-left: clamp(16px, 3vw, 40px);
    padding-right: clamp(16px, 3vw, 40px);
    box-sizing: border-box;
}
/* Prévient le scroll horizontal sur body quand une page CPT contient un
   bloc en mode full — utile pour les thèmes qui n'ont pas déjà overflow-x:hidden */
body:has(.cidfp-tseo-tp-container-full) {
    overflow-x: hidden;
}
/* Fallback pour browsers sans :has() (Firefox <=120) */
@supports not selector(:has(*)) {
    html, body { overflow-x: clip; }
}

/* En-tête SEO — panneau teal-light, ancré charte CIDFP */
.cidfp-tseo-tp-intro {
    background: #f7fcfd;
    border-left: 4px solid #199ca4;
    padding: 18px 22px;
    margin: 0 0 24px;
    border-radius: 4px;
    color: #333;
    line-height: 1.65;
    font-size: 15px;
}
.cidfp-tseo-tp-intro p:first-child { margin-top: 0; }
.cidfp-tseo-tp-intro p:last-child  { margin-bottom: 0; }
.cidfp-tseo-tp-intro h2, .cidfp-tseo-tp-intro h3 {
    color: #199ca4;
    margin: 12px 0 8px;
}

/* ══════ En-tête catalogue : H2 riche + intro SEO (charte CIDFP pro) ══════ */
.cidfp-tseo-tp-catalog-header {
    margin: 28px 0 24px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f7fcfd 0%, #eff9fa 100%);
    border-left: 4px solid #199ca4;
    border-radius: 4px;
    position: relative;
}
.cidfp-tseo-tp-catalog-h2 {
    color: #137178 !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: inherit;
}
.cidfp-tseo-tp-catalog-h2::before { content: none; }         /* pas de puce parasite */
.cidfp-tseo-tp-h2-icon {
    color: #199ca4;
    stroke: #199ca4;
    fill: none;
    flex-shrink: 0;
}
.cidfp-tseo-tp-h2-text {
    color: #137178;
    display: inline-block;
}
.cidfp-tseo-tp-catalog-intro {
    color: #333 !important;
    font-size: 15px !important;
    line-height: 1.65 !important;
    margin: 0 0 0 36px !important;                          /* aligné sous le texte du H2 (icône 24 + gap 12) */
    padding: 0 !important;
}
@media (max-width: 640px) {
    .cidfp-tseo-tp-catalog-header { padding: 16px 18px; }
    .cidfp-tseo-tp-catalog-h2 { font-size: 20px !important; gap: 10px; }
    .cidfp-tseo-tp-h2-icon { width: 20px !important; height: 20px !important; }
    .cidfp-tseo-tp-catalog-intro { font-size: 14px !important; margin-left: 30px !important; }
}
@media (max-width: 480px) {
    .cidfp-tseo-tp-catalog-h2 { font-size: 18px !important; }
    .cidfp-tseo-tp-catalog-intro { margin-left: 0 !important; }
}

/* Legacy count style (backward compat si show_count est OFF mais autre code utilise) */
.cidfp-tseo-tp-count {
    color: #666;
    font-size: 14px;
    margin: 0 0 22px;
    font-weight: 500;
}

/* ══════ Bloc « étiquettes similaires » — maillage interne SEO ══════ */
.cidfp-tseo-tp-related {
    margin-top: 40px;
    padding: 24px 26px;
    background: #f7fcfd;
    border-radius: 6px;
    border-top: 3px solid #199ca4;
}
.cidfp-tseo-tp-related-title {
    color: #199ca4;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 14px;
    line-height: 1.3;
}
.cidfp-tseo-tp-related-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.cidfp-tseo-tp-related-list li { margin: 0; }
.cidfp-tseo-tp-related-list a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #137178;
    text-decoration: none;
    padding: 8px 14px;
    border: 1px solid #d5eaec;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.cidfp-tseo-tp-related-list a:hover {
    background: #199ca4;
    color: #fff;
    border-color: #199ca4;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(25, 156, 164, 0.25);
}
.cidfp-tseo-tp-related-list .count {
    color: inherit;
    opacity: 0.7;
    font-size: 12px;
    font-weight: 400;
}
@media (max-width: 640px) {
    .cidfp-tseo-tp-related { padding: 20px; margin-top: 30px; }
    .cidfp-tseo-tp-related-list a { font-size: 13px; padding: 6px 12px; }
}

/* Description native du terme (champ "Description" WC/WP) */
.cidfp-tseo-tp-term-description {
    margin: 16px 0 20px;
    line-height: 1.7;
    color: #333;
    font-size: 15px;
}
.cidfp-tseo-tp-term-description p:first-child { margin-top: 0; }
.cidfp-tseo-tp-term-description p:last-child  { margin-bottom: 0; }

/* Zones HTML personnalisées (content_top / content_bottom) */
.cidfp-tseo-tp-content-top,
.cidfp-tseo-tp-content-bottom {
    margin: 20px 0;
    line-height: 1.7;
    color: #333;
}
.cidfp-tseo-tp-content-top { margin-bottom: 24px; }
.cidfp-tseo-tp-content-bottom { margin-top: 30px; padding-top: 20px; border-top: 1px solid #eaeaea; }
.cidfp-tseo-tp-content-top p:first-child,
.cidfp-tseo-tp-content-bottom p:first-child { margin-top: 0; }
.cidfp-tseo-tp-content-top p:last-child,
.cidfp-tseo-tp-content-bottom p:last-child { margin-bottom: 0; }
.cidfp-tseo-tp-content-top h2,
.cidfp-tseo-tp-content-bottom h2 {
    color: #199ca4;
    font-size: 22px;
    margin: 20px 0 10px;
}
.cidfp-tseo-tp-content-top h3,
.cidfp-tseo-tp-content-bottom h3 {
    color: #199ca4;
    font-size: 18px;
    margin: 16px 0 8px;
}

/* ── Grille responsive intelligente ──
 * Formule : minmax(max(PLANCHER, WIDTH_IDÉALE), 1fr) + auto-fill
 *
 *  - PLANCHER = largeur minimale absolue (lisibilité) : 260px
 *  - WIDTH_IDÉALE = (100% - N-1 gaps) / N  → largeur pour tenir N cols pile
 *  - max() choisit le plus grand → auto-adapte :
 *
 *  Container 1200px, cols=4 : ideal=278 → 4 cards de 278px ✓
 *  Container 1200px, cols=3 : ideal=378 → 3 cards de 378px ✓
 *  Container  800px, cols=4 : ideal=178 mais plancher=260 → 3 cards ✓ AUTO-ADAPTE
 *  Container  400px, cols=4 : ideal=76 mais plancher=260 → 1 card ✓
 */
.cidfp-tseo-tp-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(
        auto-fill,
        minmax(
            max(260px, calc(100% / var(--cidfp-cols-desktop, 4) - 22px)),
            1fr
        )
    );
}
@media (max-width: 1199px) {
    .cidfp-tseo-tp-grid {
        grid-template-columns: repeat(
            auto-fill,
            minmax(
                max(240px, calc(100% / var(--cidfp-cols-tablet, 3) - 20px)),
                1fr
            )
        );
        gap: 20px;
    }
}
@media (max-width: 767px) {
    .cidfp-tseo-tp-grid {
        grid-template-columns: repeat(
            auto-fill,
            minmax(
                max(220px, calc(100% / var(--cidfp-cols-mobile, 2) - 14px)),
                1fr
            )
        );
        gap: 14px;
    }
}
@media (max-width: 479px) {
    .cidfp-tseo-tp-grid { grid-template-columns: 1fr; }
}

/* ── Cards ── */
.cidfp-tseo-tp-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;                              /* toutes cards même hauteur en grid */
    transition: transform 0.18s, box-shadow 0.18s;
}
.cidfp-tseo-tp-grid { align-items: stretch; }  /* grid stretch = hauteur uniforme */
.cidfp-tseo-tp-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(25, 156, 164, 0.16);
}

.cidfp-tseo-tp-card-media {
    display: block;
    aspect-ratio: 4 / 3;                       /* force ratio uniforme quelle que soit l'image d'origine */
    overflow: hidden;
    background: #f4f6f7;
    flex-shrink: 0;
}
.cidfp-tseo-tp-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;                          /* recadre pour respecter le ratio */
    object-position: center top;                /* préserve le HAUT : logos CIDFP, titres brandés */
    display: block;
    transition: transform 0.35s ease;
}
.cidfp-tseo-tp-card:hover .cidfp-tseo-tp-card-media img {
    transform: scale(1.04);
}
.cidfp-tseo-tp-card-noimg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #ccd0d4;
}
.cidfp-tseo-tp-card-noimg .dashicons {
    font-size: 42px;
    width: 42px;
    height: 42px;
}

.cidfp-tseo-tp-card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    min-width: 0;                              /* empêche overflow des enfants larges */
}
.cidfp-tseo-tp-card-cta { margin-top: auto; }  /* push CTA en bas → alignement uniforme */
.cidfp-tseo-tp-card-title {
    font-size: 15px;
    line-height: 1.35;
    margin: 0;
    color: #1d2327;
}
.cidfp-tseo-tp-card-title a {
    color: inherit;
    text-decoration: none;
}
.cidfp-tseo-tp-card-title a:hover { color: #199ca4; }

.cidfp-tseo-tp-card-excerpt {
    color: #555;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.cidfp-tseo-tp-card-price {
    color: #199ca4;
    font-weight: 700;
    font-size: 15px;
    margin-top: auto;
}
.cidfp-tseo-tp-card-price del { color: #999; font-weight: 400; margin-right: 6px; }
.cidfp-tseo-tp-card-price ins { text-decoration: none; }

.cidfp-tseo-tp-card-cta {
    margin-top: 10px !important;
    display: block !important;                        /* force affichage même si Porto override */
}
.cidfp-tseo-tp-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    background: #199ca4 !important;
    color: #fff !important;
    padding: 9px 16px !important;
    border-radius: 3px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
    border: 0;
    cursor: pointer;
}
.cidfp-tseo-tp-btn:hover {
    background: #137178 !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(25, 156, 164, 0.25);
}
.cidfp-tseo-tp-btn::after {
    content: '→';
    display: inline-block;
    transition: transform 0.15s;
}
.cidfp-tseo-tp-btn:hover::after { transform: translateX(3px); }

.cidfp-tseo-tp-empty {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    grid-column: 1 / -1;
}

/* ── Load More / Infinite scroll ── */
.cidfp-tseo-tp-loadmore-wrap {
    margin-top: 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.cidfp-tseo-tp-loadmore-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #199ca4;
    color: #fff;
    padding: 12px 28px;
    border: 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1;
    min-width: 220px;
    justify-content: center;
}
.cidfp-tseo-tp-loadmore-btn:hover:not(:disabled) {
    background: #137178;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(25, 156, 164, 0.3);
}
.cidfp-tseo-tp-loadmore-btn.is-loading {
    background: #ccd6d8;
    cursor: wait;
    pointer-events: none;
}
.cidfp-tseo-tp-loadmore-btn.is-done {
    background: #e6f6e6;
    color: #1e3a1e;
    cursor: default;
    box-shadow: none;
    transform: none;
}
.cidfp-tseo-tp-loadmore-btn svg { flex-shrink: 0; }
.cidfp-tseo-tp-loadmore-count {
    color: #666;
    font-size: 13px;
    font-weight: 500;
}
.cidfp-tseo-tp-loadmore-shown {
    color: #199ca4;
    font-weight: 700;
}

/* ── Pagination ── */
.cidfp-tseo-tp-pagination {
    margin-top: 26px;
    display: flex;
    justify-content: center;
}
.cidfp-tseo-tp-pages {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}
.cidfp-tseo-tp-pages a,
.cidfp-tseo-tp-pages span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e0e0e2;
    border-radius: 3px;
    color: #1d2327;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.15s;
    background: #fff;
}
.cidfp-tseo-tp-pages a:hover {
    border-color: #199ca4;
    color: #199ca4;
}
.cidfp-tseo-tp-pages .current {
    background: #199ca4;
    color: #fff;
    border-color: #199ca4;
    font-weight: 700;
}
.cidfp-tseo-tp-pages .dots {
    border: 0;
    background: transparent;
    color: #999;
}

/* ── Loader ── */
.cidfp-tseo-tp-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    border-radius: 4px;
}
.cidfp-tseo-tp-loading[hidden] { display: none !important; }
.cidfp-tseo-tp-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #d5eaec;
    border-top-color: #199ca4;
    border-radius: 50%;
    animation: cidfp-tp-spin 0.7s linear infinite;
}
@keyframes cidfp-tp-spin { to { transform: rotate(360deg); } }

/* Fade grille pendant chargement */
.cidfp-tseo-tp-wrap.is-loading .cidfp-tseo-tp-grid { opacity: 0.5; pointer-events: none; }

/* ══════════════════════════════════════════════════════════════════════
   TOGGLE GRILLE ↔ LISTE (icônes + AJAX zéro reload + localStorage)
   ══════════════════════════════════════════════════════════════════════ */

/* Toolbar : container full-width qui pousse le toggle à droite */
.cidfp-tseo-tp-view-toolbar {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center;
    margin: 0 0 18px 0 !important;
    width: 100%;
}
.cidfp-tseo-tp-view-toggle {
    display: inline-flex !important;
    gap: 2px !important;
    padding: 3px !important;
    background: #f0f2f3 !important;
    border-radius: 6px !important;
    align-items: center;
    margin: 0 !important;
}
.cidfp-tseo-tp-view-btn {
    background: transparent !important;
    border: 0 !important;
    padding: 7px 12px !important;
    border-radius: 4px !important;
    color: #666 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    font-size: 13px !important;
    font-weight: 500 !important;
    transition: all 0.15s ease;
    line-height: 1 !important;
}
.cidfp-tseo-tp-view-btn:hover {
    color: #199ca4 !important;
    background: rgba(25, 156, 164, 0.08) !important;
}
.cidfp-tseo-tp-view-btn.is-active {
    background: #fff !important;
    color: #199ca4 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.cidfp-tseo-tp-view-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    flex-shrink: 0;
}
.cidfp-tseo-tp-view-btn.is-active svg { stroke: #199ca4; }
.cidfp-tseo-tp-view-lbl { display: inline-block; }
@media (max-width: 480px) {
    .cidfp-tseo-tp-view-lbl { display: none; }  /* icône seule sur mobile */
    .cidfp-tseo-tp-view-btn { padding: 7px 10px !important; }
}

/* ══════════════════════════════════════════════════════════════════════
   Bord arrondi autour du catalogue (charte CIDFP)
   ══════════════════════════════════════════════════════════════════════ */
.cidfp-tseo-tp-catalog {
    padding: 22px;
    border: 1px solid #e5e9ea;
    border-radius: 10px;
    background: #fafbfc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
}
@media (max-width: 640px) {
    .cidfp-tseo-tp-catalog { padding: 14px; border-radius: 6px; }
}

/* ══════════════════════════════════════════════════════════════════════
   Mode LISTE — modifier CIDFP .cidfp-tseo-tp-view-list SUR LE WRAP
   Spécificité élevée grâce au compound selector wrap+modifier.
   ══════════════════════════════════════════════════════════════════════ */
.cidfp-tseo-tp-wrap.cidfp-tseo-tp-view-list .cidfp-tseo-tp-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;      /* battre associated theme !important */
    gap: 14px !important;
}
.cidfp-tseo-tp-wrap.cidfp-tseo-tp-view-list .cidfp-tseo-tp-card {
    flex-direction: row !important;
    min-height: 200px !important;
    width: 100% !important;
    max-width: 100% !important;
}
.cidfp-tseo-tp-wrap.cidfp-tseo-tp-view-list .cidfp-tseo-tp-card-media {
    flex: 0 0 280px !important;
    max-width: 280px !important;
    aspect-ratio: auto !important;
    min-height: 200px !important;
    height: auto !important;
}
.cidfp-tseo-tp-wrap.cidfp-tseo-tp-view-list .cidfp-tseo-tp-card-body {
    padding: 20px 24px 22px !important;
    justify-content: center !important;
    gap: 10px !important;
    flex-grow: 1 !important;
}
.cidfp-tseo-tp-wrap.cidfp-tseo-tp-view-list .cidfp-tseo-tp-card-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}
.cidfp-tseo-tp-wrap.cidfp-tseo-tp-view-list .cidfp-tseo-tp-card-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 4px 0;
}

/* Mobile : bascule auto en vertical (image top) même en list mode */
@media (max-width: 640px) {
    .cidfp-tseo-tp-wrap.cidfp-tseo-tp-view-list .cidfp-tseo-tp-card {
        flex-direction: column;
        min-height: 0;
    }
    .cidfp-tseo-tp-wrap.cidfp-tseo-tp-view-list .cidfp-tseo-tp-card-media {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        aspect-ratio: 16 / 10;
        min-height: 0;
    }
}

/* ══════════════════════════════════════════════════════════════════════
   SLIDER — scroll snap horizontal
   Actif via classes .cidfp-tseo-tp-mode-slider ou .cidfp-tseo-tp-mode-grid_slider
   ══════════════════════════════════════════════════════════════════════ */

.cidfp-tseo-tp-slider-wrap {
    position: relative;
    margin: 12px 0;
}

.cidfp-tseo-tp-slider {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 12px 4px 20px;
    scrollbar-width: thin;
    scrollbar-color: #199ca4 #eef1f2;
}
.cidfp-tseo-tp-slider::-webkit-scrollbar {
    height: 8px;
}
.cidfp-tseo-tp-slider::-webkit-scrollbar-track {
    background: #eef1f2;
    border-radius: 4px;
}
.cidfp-tseo-tp-slider::-webkit-scrollbar-thumb {
    background: #199ca4;
    border-radius: 4px;
}
.cidfp-tseo-tp-slider .cidfp-tseo-tp-card {
    flex: 0 0 calc((100% - (var(--cidfp-cols-desktop, 4) - 1) * 18px) / var(--cidfp-cols-desktop, 4));
    scroll-snap-align: start;
    min-width: 240px;
}
@media (max-width: 1199px) {
    .cidfp-tseo-tp-slider .cidfp-tseo-tp-card {
        flex-basis: calc((100% - (var(--cidfp-cols-tablet, 3) - 1) * 18px) / var(--cidfp-cols-tablet, 3));
    }
}
@media (max-width: 767px) {
    .cidfp-tseo-tp-slider .cidfp-tseo-tp-card {
        flex-basis: calc((100% - (var(--cidfp-cols-mobile, 2) - 1) * 12px) / var(--cidfp-cols-mobile, 2));
        min-width: 200px;
    }
}

/* Flèches slider */
.cidfp-tseo-tp-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: #199ca4;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    transition: background 0.15s, transform 0.15s;
}
.cidfp-tseo-tp-arrow:hover {
    background: #137178;
    transform: translateY(-50%) scale(1.05);
}
.cidfp-tseo-tp-arrow.prev { left: -8px; }
.cidfp-tseo-tp-arrow.next { right: -8px; }
@media (max-width: 480px) {
    .cidfp-tseo-tp-arrow { display: none; } /* laisser le swipe natif mobile */
}

/* Mode grid_slider : grille sur desktop, slider sur mobile */
.cidfp-tseo-tp-mode-grid_slider .cidfp-tseo-tp-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(var(--cidfp-cols-desktop, 4), 1fr);
}
@media (max-width: 767px) {
    .cidfp-tseo-tp-mode-grid_slider .cidfp-tseo-tp-grid {
        display: flex !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        gap: 14px;
        padding-bottom: 14px;
    }
    .cidfp-tseo-tp-mode-grid_slider .cidfp-tseo-tp-grid .cidfp-tseo-tp-card {
        flex: 0 0 calc((100% - (var(--cidfp-cols-mobile, 2) - 1) * 14px) / var(--cidfp-cols-mobile, 2));
        min-width: 220px;
        scroll-snap-align: start;
    }
}

/* ══════════════════════════════════════════════════════════════════════
   6 THÈMES DE CARTES — charte CIDFP
   Un thème = ré-écriture visuelle uniforme des .cidfp-tseo-tp-card.
   La classe .cidfp-tseo-tp-theme-<key> est appliquée sur le wrap.
   ══════════════════════════════════════════════════════════════════════ */

/* ┌────────────────────────────────────────────┐
   │ THÈME 1 — CIDFP  (défaut / signature)      │
   │ Teal accent, radius 6px, ombre teintée     │
   └────────────────────────────────────────────┘ */
.cidfp-tseo-tp-theme-cidfp .cidfp-tseo-tp-card {
    background: #fff;
    border: 1px solid var(--cidfp-border);
    border-radius: var(--cidfp-radius);
    border-bottom: 3px solid var(--cidfp-teal);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cidfp-tseo-tp-theme-cidfp .cidfp-tseo-tp-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--cidfp-shadow-teal);
    border-bottom-color: var(--cidfp-teal-dark);
}
.cidfp-tseo-tp-theme-cidfp .cidfp-tseo-tp-card-title { font-size: 15px; font-weight: 700; }
.cidfp-tseo-tp-theme-cidfp .cidfp-tseo-tp-card-title a:hover { color: var(--cidfp-teal); }
.cidfp-tseo-tp-theme-cidfp .cidfp-tseo-tp-card-price { color: var(--cidfp-teal); font-weight: 700; }
.cidfp-tseo-tp-theme-cidfp .cidfp-tseo-tp-btn {
    background: var(--cidfp-teal); color: #fff !important;
    border-radius: 3px; padding: 8px 14px;
}
.cidfp-tseo-tp-theme-cidfp .cidfp-tseo-tp-btn:hover { background: var(--cidfp-teal-dark); }

/* ┌────────────────────────────────────────────┐
   │ THÈME 2 — CLASSIC                          │
   │ Bordure teal en haut, style éditorial      │
   └────────────────────────────────────────────┘ */
.cidfp-tseo-tp-theme-classic .cidfp-tseo-tp-card {
    background: #fff;
    border: 1px solid var(--cidfp-border);
    border-top: 4px solid var(--cidfp-teal);
    border-radius: 0;
    overflow: hidden;
    transition: box-shadow .18s ease, transform .18s ease;
}
.cidfp-tseo-tp-theme-classic .cidfp-tseo-tp-card:hover {
    box-shadow: var(--cidfp-shadow-soft);
    transform: translateY(-2px);
}
.cidfp-tseo-tp-theme-classic .cidfp-tseo-tp-card-body {
    padding: 18px 20px 20px;
}
.cidfp-tseo-tp-theme-classic .cidfp-tseo-tp-card-title {
    font-size: 16px; font-weight: 600; line-height: 1.3;
    padding-bottom: 10px; border-bottom: 1px solid #f0f0f0;
}
.cidfp-tseo-tp-theme-classic .cidfp-tseo-tp-card-excerpt {
    color: var(--cidfp-muted); font-size: 13px; line-height: 1.6;
}
.cidfp-tseo-tp-theme-classic .cidfp-tseo-tp-card-price {
    color: var(--cidfp-teal-dark); font-weight: 800; font-size: 17px;
    letter-spacing: -0.01em;
}
.cidfp-tseo-tp-theme-classic .cidfp-tseo-tp-btn {
    background: transparent; color: var(--cidfp-teal) !important;
    border: 1px solid var(--cidfp-teal); border-radius: 0;
    padding: 9px 16px; text-transform: uppercase;
    letter-spacing: 0.04em; font-size: 12px; font-weight: 700;
}
.cidfp-tseo-tp-theme-classic .cidfp-tseo-tp-btn:hover {
    background: var(--cidfp-teal); color: #fff !important;
}

/* ┌────────────────────────────────────────────┐
   │ THÈME 3 — ELEVATED                         │
   │ Card flottante, ombre douce, radius 12px   │
   └────────────────────────────────────────────┘ */
.cidfp-tseo-tp-theme-elevated .cidfp-tseo-tp-card {
    background: #fff;
    border: 0;
    border-radius: 12px;
    box-shadow: var(--cidfp-shadow-soft);
    overflow: hidden;
    transition: transform .22s ease, box-shadow .22s ease;
}
.cidfp-tseo-tp-theme-elevated .cidfp-tseo-tp-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 32px rgba(0,0,0,0.14), var(--cidfp-shadow-teal);
}
.cidfp-tseo-tp-theme-elevated .cidfp-tseo-tp-card-media { aspect-ratio: 16 / 10; }
.cidfp-tseo-tp-theme-elevated .cidfp-tseo-tp-card-body { padding: 16px 18px 20px; gap: 10px; }
.cidfp-tseo-tp-theme-elevated .cidfp-tseo-tp-card-title { font-size: 15px; font-weight: 600; }
.cidfp-tseo-tp-theme-elevated .cidfp-tseo-tp-card-price {
    color: var(--cidfp-teal); font-weight: 700; font-size: 16px;
    padding: 4px 10px; background: var(--cidfp-teal-light);
    border-radius: 20px; display: inline-block; width: fit-content;
}
.cidfp-tseo-tp-theme-elevated .cidfp-tseo-tp-btn {
    background: linear-gradient(135deg, var(--cidfp-teal) 0%, var(--cidfp-teal-dark) 100%);
    color: #fff !important; border-radius: 30px; padding: 10px 20px;
    box-shadow: 0 3px 10px rgba(25, 156, 164, 0.3);
}
.cidfp-tseo-tp-theme-elevated .cidfp-tseo-tp-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(25, 156, 164, 0.4);
}

/* ┌────────────────────────────────────────────┐
   │ THÈME 4 — MINIMAL                          │
   │ Zéro bordure, séparateur discret           │
   └────────────────────────────────────────────┘ */
.cidfp-tseo-tp-theme-minimal .cidfp-tseo-tp-card {
    background: transparent;
    border: 0; border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    transition: opacity .18s ease;
}
.cidfp-tseo-tp-theme-minimal .cidfp-tseo-tp-card:hover { opacity: 0.85; }
.cidfp-tseo-tp-theme-minimal .cidfp-tseo-tp-card:hover .cidfp-tseo-tp-card-title a { color: var(--cidfp-teal); }
.cidfp-tseo-tp-theme-minimal .cidfp-tseo-tp-card-media { aspect-ratio: 4 / 3; margin-bottom: 12px; }
.cidfp-tseo-tp-theme-minimal .cidfp-tseo-tp-card-media img { transition: none; }
.cidfp-tseo-tp-theme-minimal .cidfp-tseo-tp-card:hover .cidfp-tseo-tp-card-media img { transform: none; }
.cidfp-tseo-tp-theme-minimal .cidfp-tseo-tp-card-body { padding: 0; gap: 6px; }
.cidfp-tseo-tp-theme-minimal .cidfp-tseo-tp-card-title { font-size: 14px; font-weight: 500; line-height: 1.4; }
.cidfp-tseo-tp-theme-minimal .cidfp-tseo-tp-card-excerpt { font-size: 12px; color: #999; }
.cidfp-tseo-tp-theme-minimal .cidfp-tseo-tp-card-price {
    color: var(--cidfp-text); font-weight: 500; font-size: 14px;
}
.cidfp-tseo-tp-theme-minimal .cidfp-tseo-tp-btn {
    background: transparent; color: var(--cidfp-teal) !important;
    border: 0; padding: 4px 0; font-size: 12px; font-weight: 600;
    border-bottom: 1px solid var(--cidfp-teal); border-radius: 0;
    align-self: flex-start;
}
.cidfp-tseo-tp-theme-minimal .cidfp-tseo-tp-btn:hover { color: var(--cidfp-teal-dark) !important; border-color: var(--cidfp-teal-dark); background: transparent; }

/* ┌────────────────────────────────────────────┐
   │ THÈME 5 — COMPACT                          │
   │ Layout HORIZONTAL image + texte            │
   └────────────────────────────────────────────┘ */
.cidfp-tseo-tp-theme-compact .cidfp-tseo-tp-card {
    background: #fff;
    border: 1px solid var(--cidfp-border);
    border-radius: var(--cidfp-radius);
    display: flex;
    flex-direction: row;
    overflow: hidden;
    transition: box-shadow .18s ease, border-color .18s ease;
    min-height: 130px;
}
.cidfp-tseo-tp-theme-compact .cidfp-tseo-tp-card:hover {
    border-color: var(--cidfp-teal);
    box-shadow: var(--cidfp-shadow-soft);
}
.cidfp-tseo-tp-theme-compact .cidfp-tseo-tp-card-media {
    flex: 0 0 40%;
    max-width: 40%;
    aspect-ratio: auto;
    height: auto;
    align-self: stretch;
}
.cidfp-tseo-tp-theme-compact .cidfp-tseo-tp-card-body {
    flex-grow: 1; padding: 14px 18px 14px 16px;
    gap: 6px;
}
.cidfp-tseo-tp-theme-compact .cidfp-tseo-tp-card-title {
    font-size: 14px; font-weight: 600; line-height: 1.35;
}
.cidfp-tseo-tp-theme-compact .cidfp-tseo-tp-card-excerpt {
    font-size: 12px; color: var(--cidfp-muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.cidfp-tseo-tp-theme-compact .cidfp-tseo-tp-card-price {
    color: var(--cidfp-teal); font-weight: 700; font-size: 14px; margin-top: auto;
}
.cidfp-tseo-tp-theme-compact .cidfp-tseo-tp-btn {
    background: var(--cidfp-teal); color: #fff !important;
    padding: 6px 12px; font-size: 12px; border-radius: 3px;
    align-self: flex-start;
}
/* Compact mode : force les colonnes plus larges */
.cidfp-tseo-tp-theme-compact .cidfp-tseo-tp-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
}

/* ┌────────────────────────────────────────────┐
   │ THÈME 7 — CIDFP « Formations associées »   │
   │ Layout horizontal image + texte,           │
   │ badge orange durée sur image,              │
   │ étoiles + prix multi-lieu Inter/Intra/…    │
   └────────────────────────────────────────────┘ */
.cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-card {
    background: #fff;
    border: 1px solid #dfe9ee;
    border-radius: 6px;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    min-height: 160px;
    transition: box-shadow .18s ease, border-color .18s ease;
}
.cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-card:hover {
    border-color: var(--cidfp-teal);
    box-shadow: 0 4px 14px rgba(25, 156, 164, 0.12);
}
.cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-card-media {
    position: relative;
    flex: 0 0 42%;
    max-width: 42%;
    min-width: 160px;
    aspect-ratio: auto;
    height: auto;
    min-height: 210px;
    align-self: stretch;
    background: #eaf0f2;
}
.cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-card-media img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center top;                /* garde le logo CIDFP en haut visible */
}
.cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-card-body {
    flex-grow: 1;
    padding: 16px 20px 18px;
    gap: 6px;
    background: #f8fafb;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;                    /* évite le overflow des enfants */
}
.cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-card-title {
    font-size: 16px; font-weight: 700; line-height: 1.3;
    color: var(--cidfp-teal-dark);
    margin: 0 0 4px;
}
.cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-card-title a { color: var(--cidfp-teal-dark); text-decoration: none; }
.cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-card-title a:hover { color: var(--cidfp-teal); text-decoration: underline; }

/* Étoiles + "Avis clients" */
.cidfp-tseo-tp-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin: 2px 0 6px;
    flex-wrap: wrap;
}
.cidfp-tseo-tp-rating .stars {
    display: inline-flex;
    gap: 2px;
    color: #f7b500;
    font-size: 20px;
    line-height: 1;
    letter-spacing: 1px;
}
.cidfp-tseo-tp-rating .stars .star.full  { color: #f7b500; text-shadow: 0 1px 0 rgba(0,0,0,0.02); }
.cidfp-tseo-tp-rating .stars .star.half  { color: #f7b500; opacity: 0.55; }
.cidfp-tseo-tp-rating .stars .star.empty { color: #b8b8b8; }
.cidfp-tseo-tp-rating .reviews-link {
    color: #1d2327;
    text-decoration: underline;
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
}
.cidfp-tseo-tp-rating .reviews-link:hover { color: var(--cidfp-teal); }
.cidfp-tseo-tp-rating.is-placeholder .reviews-link { color: #999; }

/* Prix multi-lieu (Inter / Intra / Sur-mesure)
 * Layout TABLE — alignement propre des « : » et wrap contrôlé.
 * Chaque ligne : LABEL │ MONTANT ("nowrap" fort) │ UNITÉ optionnelle
 */
.cidfp-tseo-tp-prices-multi {
    display: table;
    margin-top: 8px;
    font-size: 14px;
    color: #f28c1c;
    line-height: 1.55;
    width: 100%;
    border-spacing: 0;
}
.cidfp-tseo-tp-prices-multi > div {
    display: table-row;
}
.cidfp-tseo-tp-prices-multi > div > * {
    display: table-cell;
    vertical-align: baseline;
    padding: 2px 0;
}
.cidfp-tseo-tp-prices-multi strong {
    color: #f28c1c;
    font-weight: 700;
    padding-right: 8px;
    white-space: nowrap;
    width: 1%;                        /* la colonne label se contracte à son texte */
}
/* Wrapper visuel de la valeur : force nowrap pour l'ensemble prix + unit */
.cidfp-tseo-tp-prices-multi > div > :not(strong) {
    color: #f28c1c;
}
.cidfp-tseo-tp-prices-multi .unit {
    color: #f28c1c;
    font-weight: 400;
    font-size: 13px;
    white-space: nowrap;
    margin-left: 4px;
}
/* WooCommerce injecte .amount + éventuels wrappers */
.cidfp-tseo-tp-prices-multi .amount,
.cidfp-tseo-tp-prices-multi .woocommerce-Price-amount {
    color: inherit;
    font-weight: 700;
    white-space: nowrap;
    display: inline;
}
.cidfp-tseo-tp-prices-multi ins { text-decoration: none; display: inline; }
.cidfp-tseo-tp-prices-multi del {
    color: #b0b0b0;
    opacity: 0.75;
    font-weight: 400;
    margin-right: 4px;
    display: inline;
}
/* Retour à ligne PROPRE si carte trop étroite : le prix reste solidaire de son unit */
@media (max-width: 480px) {
    .cidfp-tseo-tp-prices-multi { display: block; }
    .cidfp-tseo-tp-prices-multi > div { display: block; }
    .cidfp-tseo-tp-prices-multi > div > * { display: inline; }
    .cidfp-tseo-tp-prices-multi strong { width: auto; }
}

/* Badge durée orange sur image — icône + texte sur UNE ligne, jamais wrappé.
   !important sur les propriétés critiques : Porto/Elementor peuvent injecter
   des styles concurrents (`display:block`, `word-break:break-all`…) */
.cidfp-tseo-tp-badge-duration {
    position: absolute !important;
    left: 10px !important;
    bottom: 10px !important;
    background: #f28c1c !important;
    color: #fff !important;
    padding: 5px 10px 5px 8px !important;
    border-radius: 3px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    z-index: 2;
    line-height: 1 !important;
    white-space: nowrap !important;              /* empêche « 2 jours » de casser */
    width: auto !important;
    height: auto !important;
    max-width: calc(100% - 20px);
    box-sizing: border-box !important;
    /* Anti-Porto : blocs `<span>` que le thème pourrait forcer en block */
    word-break: keep-all !important;
    word-wrap: normal !important;
    overflow-wrap: normal !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}
.cidfp-tseo-tp-badge-duration svg.icon,
.cidfp-tseo-tp-badge-duration .dashicons {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    color: #fff !important;
    stroke: #fff !important;
    fill: none;
    flex-shrink: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
}
.cidfp-tseo-tp-badge-duration .text {
    display: inline-block !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    font-weight: inherit !important;
    color: #fff !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    word-break: keep-all !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* SVG placeholder (aucune image) */
.cidfp-tseo-tp-card-noimg svg {
    width: 42px;
    height: 42px;
    color: #ccd0d4;
    stroke: currentColor;
}

/* CTA visible sur le thème associated (bouton « Voir le détail »)
   Style spécifique intégré au layout horizontal */
.cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-card-cta {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #e0e0e0;
}
.cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-btn {
    background: var(--cidfp-teal);
    color: #fff !important;
    padding: 7px 14px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
}
.cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-btn:hover { background: var(--cidfp-teal-dark); }

/* Grille associated : plancher plus HAUT (380px) car layout horizontal
   (image gauche + texte droite) a besoin de plus de largeur pour rester lisible */
.cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-grid {
    grid-template-columns: repeat(
        auto-fill,
        minmax(
            max(380px, calc(100% / var(--cidfp-cols-desktop, 3) - 22px)),
            1fr
        )
    ) !important;
}
@media (max-width: 1199px) {
    .cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-grid {
        grid-template-columns: repeat(
            auto-fill,
            minmax(
                max(340px, calc(100% / var(--cidfp-cols-tablet, 2) - 20px)),
                1fr
            )
        ) !important;
    }
}

/* Breakpoint tablet : ajustement typographique uniquement */
@media (max-width: 1024px) {
    .cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-prices-multi strong {
        min-width: 74px;
    }
}

/* Breakpoint mobile : bascule en cartes verticales (image top, texte dessous) */
@media (max-width: 640px) {
    .cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-card {
        flex-direction: column;
        min-height: 0;
    }
    .cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-card-media {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        min-height: 0;
        aspect-ratio: 16 / 10;
    }
    .cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-card-body {
        padding: 14px 16px 16px;
    }
    .cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-prices-multi strong {
        min-width: 70px;
    }
    .cidfp-tseo-tp-theme-associated .cidfp-tseo-tp-card-title { font-size: 15px; }
}

/* ┌────────────────────────────────────────────┐
   │ THÈME 6 — OVERLAY (image + texte dessus)   │
   │ Style magazine, gradient sombre au bas     │
   └────────────────────────────────────────────┘ */
.cidfp-tseo-tp-theme-overlay .cidfp-tseo-tp-card {
    position: relative;
    background: #1d2327;
    border: 0;
    border-radius: var(--cidfp-radius);
    overflow: hidden;
    transition: transform .18s ease;
    aspect-ratio: 3 / 4;
    display: block;
}
.cidfp-tseo-tp-theme-overlay .cidfp-tseo-tp-card:hover { transform: scale(1.02); }
.cidfp-tseo-tp-theme-overlay .cidfp-tseo-tp-card-media {
    position: absolute;
    inset: 0;
    aspect-ratio: auto;
    height: 100%;
    width: 100%;
}
.cidfp-tseo-tp-theme-overlay .cidfp-tseo-tp-card-media img {
    height: 100%;
    filter: brightness(0.85);
    transition: filter .3s ease, transform .35s ease;
}
.cidfp-tseo-tp-theme-overlay .cidfp-tseo-tp-card:hover .cidfp-tseo-tp-card-media img {
    filter: brightness(0.55);
    transform: scale(1.08);
}
.cidfp-tseo-tp-theme-overlay .cidfp-tseo-tp-card-body {
    position: absolute;
    inset: 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(180deg,
        rgba(0,0,0,0) 40%,
        rgba(0,0,0,0.75) 100%);
    color: #fff;
    gap: 6px;
}
.cidfp-tseo-tp-theme-overlay .cidfp-tseo-tp-card-title {
    color: #fff; font-size: 15px; font-weight: 700;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.cidfp-tseo-tp-theme-overlay .cidfp-tseo-tp-card-title a { color: #fff; }
.cidfp-tseo-tp-theme-overlay .cidfp-tseo-tp-card-title a:hover { color: var(--cidfp-teal-light); }
.cidfp-tseo-tp-theme-overlay .cidfp-tseo-tp-card-excerpt {
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.cidfp-tseo-tp-theme-overlay .cidfp-tseo-tp-card-price {
    color: #fff; font-weight: 700; font-size: 15px;
    background: rgba(25, 156, 164, 0.9);
    padding: 3px 10px; border-radius: 3px;
    align-self: flex-start;
    backdrop-filter: blur(4px);
}
.cidfp-tseo-tp-theme-overlay .cidfp-tseo-tp-btn {
    background: rgba(255,255,255,0.15); color: #fff !important;
    border: 1px solid rgba(255,255,255,0.4);
    backdrop-filter: blur(6px); border-radius: 3px;
    padding: 7px 12px; font-size: 12px;
    align-self: flex-start;
}
.cidfp-tseo-tp-theme-overlay .cidfp-tseo-tp-btn:hover {
    background: var(--cidfp-teal); border-color: var(--cidfp-teal);
}
