/* ── Capsys Fiche Shortcode ───────────────────────────────────────────────── */

.capsys-fiche-card {
    display: inline-flex;
    flex-direction: column;
    width: 160px;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    overflow: visible;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .15s, border-color .15s;
    vertical-align: top;
    position: relative;
}

.capsys-fiche-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    border-color: #c0c4cc;
}

/* Miniature */
.capsys-fiche-thumb-link {
    display: block;
    text-decoration: none;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.capsys-fiche-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.capsys-fiche-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity .15s;
}

.capsys-fiche-thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .15s;
}

.capsys-fiche-thumb-link:hover .capsys-fiche-thumb-overlay {
    opacity: 1;
}

.capsys-fiche-noimg {
    padding: 20px;
}

.capsys-fiche-noimg svg {
    width: 100%;
    height: auto;
    max-width: 72px;
}

/* Footer : nom + bouton ... */
.capsys-fiche-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 6px 8px 10px;
    border-top: 1px solid #f0f0f0;
    min-height: 38px;
}

.capsys-fiche-footer-name {
    flex: 1;
    font-size: 11.5px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

/* Bouton trois points */
.capsys-fiche-menu-wrap {
    position: relative;
    flex-shrink: 0;
}

.capsys-fiche-menu-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    padding: 0;
    transition: background .12s;
}

.capsys-fiche-menu-btn:hover {
    background: #f0f0f0;
}

.capsys-fiche-menu-btn span {
    display: block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #666;
}

/* Menu déroulant */
.capsys-fiche-menu {
    position: absolute;
    bottom: calc(100% + 4px);
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,.14);
    z-index: 9999;
    min-width: 160px;
    overflow: hidden;
}

.capsys-fiche-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: background .1s;
    cursor: pointer;
    white-space: nowrap;
}

.capsys-fiche-menu-item:hover {
    background: #f5f9ff;
    color: #2271b1;
}

.capsys-fiche-menu-item + .capsys-fiche-menu-item {
    border-top: 1px solid #f0f0f0;
}

/* ── Canvas PDF.js ──────────────────────────────────────────────────────── */
.capsys-pdf-canvas {
    display: none;
    width: 100%;
    height: auto;
    background: #fff;
}

.capsys-pdf-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 120px;
    background: #f8f8f8;
}

.capsys-pdf-icon {
    width: 60%;
    max-width: 72px;
    height: auto;
    opacity: 0.7;
}
