/**
 * Vidéothèque — Interface de modération v2.1
 * Template seb_list_videotheque
 * 100% autonome — aucune dépendance UIkit 2 ou 3
 * BEM .vmod-*
 */

/* ── Masquer filtres et pagination Seblod ── */
.cck-page-search,
.cck_page_search,
#cck_page_search,
.cck-f,
.pagination {
    display: none !important;
}

/* ── Reset box-sizing pour le scope ── */
[class^="vmod-"],
[class*=" vmod-"] {
    box-sizing: border-box;
}

/* ══════════════════════════════════════
   Toolbar (stats + recherche + perPage)
   ══════════════════════════════════════ */
.vmod-toolbar {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 16px;
}
.vmod-toolbar__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.vmod-toolbar__right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* ── Stats / filter pills ── */
.vmod-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.vmod-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    background: #f5f5f5;
    cursor: pointer;
    transition: all .2s;
    border: 2px solid transparent;
    user-select: none;
}
.vmod-stat:hover {
    background: #eee;
}
.vmod-stat.active {
    border-color: currentColor;
}
.vmod-stat__icon {
    font-style: normal;
    font-size: 14px;
}
.vmod-stat--unchecked { color: #e67e22; }
.vmod-stat--unchecked.active { background: #fef5ec; }
.vmod-stat--published { color: #27ae60; }
.vmod-stat--published.active { background: #eafaf1; }
.vmod-stat--rejected { color: #7f8c8d; }
.vmod-stat--rejected.active { background: #f0f1f1; }
.vmod-stat--all { color: #2c3e50; }
.vmod-stat--all.active { background: #ebf0f5; }
.vmod-stat__count {
    font-size: 15px;
    font-weight: 700;
}

/* ── Search ── */
.vmod-search {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.vmod-search__icon {
    position: absolute;
    left: 10px;
    font-size: 14px;
    pointer-events: none;
}
.vmod-search__input {
    width: 220px;
    height: 34px;
    padding: 0 30px 0 34px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    transition: border-color .2s;
}
.vmod-search__input:focus {
    border-color: #1a237e;
}
.vmod-search__clear {
    position: absolute;
    right: 8px;
    font-size: 14px;
    color: #999;
    text-decoration: none;
    cursor: pointer;
    line-height: 1;
}
.vmod-search__clear:hover {
    color: #e74c3c;
}

/* ── Select ── */
.vmod-select {
    height: 34px;
    padding: 0 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}

/* ── Info text ── */
.vmod-info {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
}

/* ══════════════════════════════════════
   Bulk actions bar (sticky)
   ══════════════════════════════════════ */
.vmod-bulk {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #1a237e;
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    display: none;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.vmod-bulk.visible {
    display: flex;
}
.vmod-bulk__count {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}
.vmod-bulk__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.vmod-bulk__btn {
    padding: 6px 16px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}
.vmod-bulk__btn:hover { opacity: .85; }
.vmod-bulk__btn--publish { background: #27ae60; color: #fff; }
.vmod-bulk__btn--reject { background: #95a5a6; color: #fff; }
.vmod-bulk__btn--unpublish { background: #e74c3c; color: #fff; }
.vmod-bulk__btn--cancel {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,.4);
}
.vmod-bulk__select-all {
    margin-left: auto;
    padding: 5px 12px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
}
.vmod-bulk__select-all:hover {
    background: rgba(255,255,255,.25);
}

/* ══════════════════════════════════════
   Video list
   ══════════════════════════════════════ */
.vmod-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Video card ── */
.vmod-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    transition: all .2s;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}
.vmod-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.vmod-card--unchecked { border-left-color: #e67e22; }
.vmod-card--published { border-left-color: #27ae60; opacity: .8; }
.vmod-card--published:hover { opacity: 1; }
.vmod-card--rejected { border-left-color: #95a5a6; opacity: .6; }
.vmod-card--rejected:hover { opacity: .85; }

.vmod-card__grid {
    display: flex;
    align-items: stretch;
}

/* Checkbox */
.vmod-check {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1a237e;
}

/* ── Thumbnail column ── */
.vmod-card__thumb-col {
    flex: 0 0 180px;
    min-width: 0;
}

.vmod-thumb {
    position: relative;
    overflow: hidden;
    background: #f0f0f0;
    height: 100%;
    min-height: 100px;
}
.vmod-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vmod-thumb__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    color: #999;
    font-size: 32px;
}
.vmod-thumb__play {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.4);
    color: #fff;
    font-size: 28px;
    opacity: 0;
    transition: opacity .2s;
    text-decoration: none;
}
.vmod-thumb:hover .vmod-thumb__play {
    opacity: 1;
}

/* Badge */
.vmod-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 2px 7px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    border-radius: 3px;
    color: #fff;
}
.vmod-badge--unchecked { background: #e67e22; }
.vmod-badge--published { background: #27ae60; }
.vmod-badge--rejected { background: #95a5a6; }

/* ── Content column ── */
.vmod-card__content {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
}
.vmod-card__cols {
    display: flex;
    gap: 16px;
}
.vmod-card__info {
    flex: 1;
    min-width: 0;
}
.vmod-card__manif-col {
    flex: 1;
    min-width: 0;
}
.vmod-card__title {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vmod-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.vmod-card__date {
    font-size: 12px;
    color: #888;
}
.vmod-card__desc {
    margin: 0;
    font-size: 12px;
    color: #666;
    max-height: 36px;
    overflow: hidden;
    line-height: 1.5;
}

/* Origin badge */
.vmod-origin {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
}
.vmod-origin--yt { background: #c4302b; }
.vmod-origin--vimeo { background: #1ab7ea; }
.vmod-origin--dm { background: #0066dc; }
.vmod-origin--canalu { background: #c1002a; }

/* ── Manifestation info ── */
.vmod-manif {
    background: #f8f9fa;
    padding: 8px 10px;
    border-radius: 4px;
    border-left: 3px solid #1a237e;
}
.vmod-manif--none {
    border-left-color: #e67e22;
}
.vmod-manif__label {
    font-size: 11px;
    color: #888;
    margin-bottom: 2px;
}
.vmod-manif__link {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    display: block;
    line-height: 1.3;
}
.vmod-manif__link:hover {
    color: #1a237e;
}
.vmod-manif__date {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
}
.vmod-manif__error {
    font-size: 12px;
    color: #e74c3c;
}

/* ── Actions column ── */
.vmod-card__actions-col {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}
.vmod-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 12px;
}

/* ── Buttons (autonomes) ── */
.vmod-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all .2s;
    background: #fff;
    color: #333;
    line-height: 1.4;
}
.vmod-btn:hover {
    opacity: .85;
}
.vmod-btn--primary {
    background: #1a237e;
    color: #fff;
    border-color: #1a237e;
}
.vmod-btn--danger {
    background: #e74c3c;
    color: #fff;
    border-color: #e74c3c;
}
.vmod-btn--default {
    background: #f5f5f5;
    color: #333;
    border-color: #ccc;
}

/* ══════════════════════════════════════
   States & animations
   ══════════════════════════════════════ */
.vmod-item.processing {
    opacity: .4;
    pointer-events: none;
}
.vmod-item.flash-success {
    animation: vmodFlashGreen .5s ease;
}
.vmod-item.flash-error {
    animation: vmodFlashRed .5s ease;
}
@keyframes vmodFlashGreen {
    0%, 100% { background: transparent; }
    50% { background: rgba(39, 174, 96, .2); }
}
@keyframes vmodFlashRed {
    0%, 100% { background: transparent; }
    50% { background: rgba(231, 76, 60, .2); }
}

/* ══════════════════════════════════════
   Toast
   ══════════════════════════════════════ */
.vmod-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 6px;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    z-index: 10000;
    transform: translateY(80px);
    opacity: 0;
    transition: all .3s;
}
.vmod-toast.show {
    transform: translateY(0);
    opacity: 1;
}
.vmod-toast--success { background: #27ae60; }
.vmod-toast--error { background: #e74c3c; }
.vmod-toast--info { background: #2980b9; }

/* ══════════════════════════════════════
   Pagination
   ══════════════════════════════════════ */
.vmod-pagination-wrap {
    margin: 24px 0 16px;
}
.vmod-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.vmod-pagination a,
.vmod-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all .2s;
}
.vmod-pagination a {
    background: #f5f5f5;
    color: #333;
}
.vmod-pagination a:hover {
    background: #e0e0e0;
}
.vmod-pagination .active {
    background: #1a237e;
    color: #fff;
}
.vmod-pagination .disabled {
    opacity: .4;
    pointer-events: none;
}

/* ══════════════════════════════════════
   Empty state
   ══════════════════════════════════════ */
.vmod-empty {
    background: #e8f4fd;
    border: 1px solid #bee5f7;
    border-radius: 6px;
    padding: 20px;
    margin-top: 16px;
    color: #2980b9;
    font-size: 14px;
}

/* ══════════════════════════════════════
   Responsive
   ══════════════════════════════════════ */
@media (max-width: 768px) {
    .vmod-toolbar__row {
        flex-direction: column;
        align-items: stretch;
    }
    .vmod-toolbar__right {
        flex-wrap: wrap;
    }
    .vmod-search__input {
        width: 100%;
    }
    .vmod-card__grid {
        flex-direction: column;
    }
    .vmod-card__thumb-col {
        flex: 0 0 auto;
        max-height: 160px;
    }
    .vmod-card__cols {
        flex-direction: column;
        gap: 8px;
    }
    .vmod-card__actions-col {
        border-top: 1px solid #eee;
    }
    .vmod-actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .vmod-bulk {
        flex-wrap: wrap;
    }
    .vmod-bulk__select-all {
        margin-left: 0;
    }
}
