/* ============================================================
   PFM — Ens. & Préd. : Styles frontend (canvas)
   Utilise les variables CSS du Core : --pfm-primary, --pfm-radius…
   ============================================================ */

/* ── Section wrapper ────────────────────────────────────────── */
.pfmep-section {
    max-width: 860px;
    margin: 0 auto;
    padding: 24px 16px 48px;
    font-family: var(--pfm-font, 'Inter', sans-serif);
    color: var(--pfm-text, #374151);
}

/* ── En-tête ────────────────────────────────────────────────── */
.pfmep-header {
    text-align: center;
    margin-bottom: 32px;
}
.pfmep-header-icon {
    font-size: 40px;
    margin-bottom: 8px;
}
.pfmep-main-title {
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 800;
    color: var(--pfm-primary, #1d4ed8);
    margin: 0 0 8px;
}
.pfmep-main-subtitle {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
}

/* ── Filtres ─────────────────────────────────────────────────── */
.pfmep-filters-bar {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: var(--pfm-radius, 12px);
    padding: 16px 20px;
    margin-bottom: 28px;
}
.pfmep-filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.pfmep-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pfmep-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.pfmep-select {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 14px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    min-width: 140px;
}
.pfmep-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-bottom: 2px;
}
.pfmep-btn-filter {
    background: var(--pfm-primary, #1d4ed8);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}
.pfmep-btn-filter:hover { opacity: .88; }
.pfmep-btn-reset {
    color: #6b7280;
    font-size: 13px;
    text-decoration: none;
    padding: 8px 10px;
}
.pfmep-btn-reset:hover { text-decoration: underline; }

/* ── Liste verticale ─────────────────────────────────────────── */
.pfmep-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pfmep-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--pfm-radius, 12px);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    transition: box-shadow .2s, transform .2s;
}
.pfmep-item:hover {
    box-shadow: 0 6px 18px rgba(29,78,216,.12);
    transform: translateY(-1px);
}

/* Miniature */
.pfmep-item-thumb-link { flex-shrink: 0; }
.pfmep-item-thumb {
    width: 130px;
    height: 100px;
    object-fit: cover;
    display: block;
}
.pfmep-item-thumb-placeholder {
    width: 130px;
    height: 100px;
    background: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

/* Corps */
.pfmep-item-body {
    flex: 1;
    padding: 14px 16px 14px 0;
}
.pfmep-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}
.pfmep-item-date {
    font-size: 12px;
    color: #9ca3af;
}
.pfmep-media-badge {
    font-size: 11px;
    background: #f3f4f6;
    color: #374151;
    border-radius: 20px;
    padding: 2px 8px;
}

.pfmep-item-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #111827;
    line-height: 1.35;
}
.pfmep-item-title a {
    color: inherit;
    text-decoration: none;
}
.pfmep-item-title a:hover {
    color: var(--pfm-primary, #1d4ed8);
}
.pfmep-item-excerpt {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 10px;
    line-height: 1.55;
}
.pfmep-read-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--pfm-primary, #1d4ed8);
    text-decoration: none;
}
.pfmep-read-more:hover { text-decoration: underline; }

/* ── Badges type ─────────────────────────────────────────────── */
.pfmep-type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.pfmep-badge-enseignement {
    background: #dbeafe;
    color: #1d4ed8;
}
.pfmep-badge-predication {
    background: #ede9fe;
    color: #7c3aed;
}
.pfmep-badge-lg {
    font-size: 14px;
    padding: 5px 14px;
    margin-bottom: 8px;
}

/* ── Vide ────────────────────────────────────────────────────── */
.pfmep-empty {
    text-align: center;
    padding: 48px 20px;
    color: #9ca3af;
}
.pfmep-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

/* ── Page détail ─────────────────────────────────────────────── */
.pfmep-section-single { max-width: 780px; }

.pfmep-single-back {
    margin-bottom: 20px;
}
.pfmep-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--pfm-primary, #1d4ed8);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.pfmep-back-btn:hover { text-decoration: underline; }

.pfmep-single {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--pfm-radius, 12px);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.pfmep-single-header {
    padding: 28px 28px 0;
}
.pfmep-single-title {
    font-size: clamp(20px, 4vw, 26px);
    font-weight: 800;
    color: #111827;
    margin: 8px 0 6px;
    line-height: 1.3;
}
.pfmep-single-date {
    font-size: 13px;
    color: #9ca3af;
    margin: 0 0 20px;
}

/* Image de couverture (pleine largeur) */
.pfmep-single-cover {
    width: 100%;
}
.pfmep-single-cover-img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    display: block;
}
.pfmep-cover-aside {
    padding: 0 28px;
    margin: 16px 0;
}
.pfmep-single-cover-img-sm {
    border-radius: 8px;
    max-height: 200px;
    width: auto;
    object-fit: cover;
}

/* Lecteur vidéo YouTube */
.pfmep-video-wrap {
    padding: 0 28px;
    margin: 20px 0;
}
.pfmep-video-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
}
.pfmep-video-responsive iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 10px;
}

/* Lecteur audio (wrapper, le player personnalisé gère le reste) */
.pfmep-audio-wrap {
    margin: 20px 28px;
}

/* Description */
.pfmep-single-description {
    padding: 20px 28px;
}
.pfmep-single-text {
    font-size: 15px;
    line-height: 1.75;
    color: #374151;
}
.pfmep-single-text p { margin: 0 0 16px; }
.pfmep-single-text p:last-child { margin-bottom: 0; }

/* Footer détail */
.pfmep-single-footer {
    padding: 20px 28px 28px;
    border-top: 1px solid #f3f4f6;
    margin-top: 10px;
}
.pfmep-back-btn-bottom {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--pfm-primary, #1d4ed8);
    color: #fff;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .2s;
}
.pfmep-back-btn-bottom:hover { opacity: .88; color: #fff; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    .pfmep-item {
        flex-direction: column;
    }
    .pfmep-item-thumb,
    .pfmep-item-thumb-placeholder {
        width: 100%;
        height: 160px;
    }
    .pfmep-item-body {
        padding: 14px 16px;
    }
    .pfmep-filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    .pfmep-select { min-width: unset; width: 100%; }
    .pfmep-single-header,
    .pfmep-video-wrap,
    .pfmep-audio-wrap,
    .pfmep-single-description,
    .pfmep-single-footer,
    .pfmep-cover-aside { padding-left: 16px; padding-right: 16px; }
}
