/**
 * cdf-account — Widgets Elementor (Mes favoris / Mes playlists)
 * Markup unifié .cdf-coll, layouts grid/list, ratios et hover discrets.
 * Toutes les valeurs visuelles sont surchargeables via les controls Elementor.
 */

.cdf-coll {
    --cdf-coll-cols: 3;
    --cdf-coll-gap: 16px;
    --cdf-coll-thumb-ratio: 1 / 1;
    --cdf-coll-radius: 6px;
    --cdf-coll-bg: transparent;
    --cdf-coll-border: 1px solid rgba(0, 0, 0, 0.08);
    --cdf-coll-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    --cdf-coll-shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.08);

    display: grid;
    gap: var(--cdf-coll-gap);
}

.cdf-coll--grid {
    grid-template-columns: repeat(var(--cdf-coll-cols), minmax(0, 1fr));
}

.cdf-coll--list {
    grid-template-columns: 1fr;
}

@media (max-width: 1024px) {
    .cdf-coll--grid { grid-template-columns: repeat(min(var(--cdf-coll-cols), 2), minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .cdf-coll--grid { grid-template-columns: 1fr; }
}

.cdf-coll-item {
    position: relative;
    background: var(--cdf-coll-bg);
    border: var(--cdf-coll-border);
    border-radius: var(--cdf-coll-radius);
    box-shadow: var(--cdf-coll-shadow);
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
    overflow: hidden;
}

.cdf-coll-item:hover {
    box-shadow: var(--cdf-coll-shadow-hover);
}

.cdf-coll-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.cdf-coll--list .cdf-coll-link {
    flex-direction: row;
    align-items: center;
    gap: 16px;
}

.cdf-coll-thumb {
    margin: 0;
    background: rgba(0, 0, 0, 0.04);
    aspect-ratio: var(--cdf-coll-thumb-ratio);
    overflow: hidden;
    flex-shrink: 0;
}

.cdf-coll--list .cdf-coll-thumb {
    width: 96px;
    height: 96px;
    border-radius: calc(var(--cdf-coll-radius) - 2px);
}

.cdf-coll-thumb-img,
.cdf-coll-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cdf-coll-thumb-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.08));
}

.cdf-coll-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.cdf-coll--list .cdf-coll-body {
    padding: 0;
}

.cdf-coll-title {
    font-size: 1.05em;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    overflow-wrap: break-word;
}

.cdf-coll-meta {
    font-size: 0.85em;
    opacity: 0.7;
    line-height: 1.3;
}

.cdf-coll-meta a {
    color: inherit;
    text-decoration: none;
}

.cdf-coll-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    z-index: 2;
}

.cdf-coll--list .cdf-coll-actions {
    position: static;
    margin-left: auto;
}

.cdf-coll-empty {
    margin: 0;
    padding: 24px;
    text-align: center;
    opacity: 0.7;
    font-style: italic;
}

.cdf-coll-foot {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.cdf-coll-viewall {
    display: inline-block;
    padding: 8px 18px;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: inherit;
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    line-height: 1.4;
    transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.cdf-coll-viewall:hover {
    transform: translateY(-1px);
}
