/* Aligné sur medias_displayer (mode embed / owner) — stats + engagement + partage + modale auth */
.medias-displayer-embed.artc-reading-engagement-root,
.cntnts-owner-medias-wrap .medias-displayer-embed.artc-reading-engagement-root {
    font-family: Arial, sans-serif;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 auto;
    overflow-x: hidden;
}
.medias-displayer-embed.artc-reading-engagement-root *,
.medias-displayer-embed.artc-reading-engagement-root *::before,
.medias-displayer-embed.artc-reading-engagement-root *::after { box-sizing: inherit; }

.cntnts-owner-medias-wrap .artc-reading-engagement-root .card.article {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ececec;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.media-stats { color: #555; margin-top: 8px; }
.media-stats span { margin-right: 10px; }

.engagement-panel {
    border-top: 1px solid #eee;
    margin-top: 8px;
    padding: 8px 10px 10px;
    background: #f9f9f9;
}
.engagement-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
    width: 100%;
    max-width: 100%;
    margin-bottom: 8px;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.engagement-actions::-webkit-scrollbar { height: 0; }
.engagement-dual {
    flex: 1 1 0;
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid #e2e4e8;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f1f3;
}
.engagement-dual .engagement-btn {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    margin: 0;
    padding: 5px 5px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.15;
    white-space: nowrap;
    border: none;
    border-radius: 0;
    border-right: 1px solid #e8eaed;
    background: #fff;
    box-shadow: none;
    transition: background .15s ease, color .15s ease;
}
.engagement-dual .engagement-btn:last-child { border-right: none; }
.engagement-dual .engagement-btn:hover:not(:disabled):not(.is-active) { background: #f9fafb; }
.engagement-dual .engagement-btn.is-active:hover:not(:disabled) { filter: brightness(0.98); }
.engagement-btn-count {
    display: inline-block;
    margin-left: 0;
    padding: 0 4px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    color: #5c6370;
    min-width: 1.1em;
    text-align: center;
    flex-shrink: 0;
}
.engagement-dual .engagement-btn.is-active {
    background: #e8f4fc;
    color: #0c4a6e;
    font-weight: 600;
}
.engagement-dual .engagement-btn.is-active .engagement-btn-count {
    background: rgba(2, 132, 199, 0.14);
    color: #0c4a6e;
}
.engagement-dual .engagement-btn.is-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #38bdf8;
}
.engagement-btn, .comment-submit {
    border: 1px solid #d7d7d7;
    background: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
    font-size: 14px;
    line-height: 1.35;
}
.engagement-btn:hover, .comment-submit:hover { background: #f0f0f0; }
.engagement-comments {
    display: block;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e4e4e4;
}
.engagement-comments .comment-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    align-items: stretch;
    margin-bottom: 12px;
    box-sizing: border-box;
}
.engagement-comments .comment-input {
    width: 100%;
    max-width: 100%;
    min-height: 88px;
    resize: vertical;
    box-sizing: border-box;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    padding: 12px 14px;
    font: inherit;
}
.engagement-comments .comment-submit { align-self: flex-end; min-width: 120px; }
.engagement-message { font-size: 13px; color: #666; margin-top: 8px; }
.comment-item { font-size: 14px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #eee; }
.comment-meta { font-size: 12px; color: #666; margin-bottom: 6px; }
.comment-author { font-weight: 600; color: #333; }
.comment-text { margin: 0; white-space: pre-wrap; color: #222; }
.comment-reply-btn {
    margin-top: 6px; font-size: 12px; border: 1px solid #cbd5e1; background: #fff;
    border-radius: 6px; padding: 4px 10px; cursor: pointer;
}
.comment-thread-replies {
    margin-left: 0.35rem;
    padding-left: 0.5rem;
    border-left: 2px solid #e8edf4;
}
.comment-invite { font-size: 14px; color: #555; padding: 8px 0; }
.comment-reply-banner { font-size: 13px; background: #f0f7ff; border: 1px solid #bee3f8; padding: 8px; border-radius: 8px; margin-bottom: 8px; }
.comment-cancel-reply { margin-left: 8px; font-size: 12px; border: none; background: none; color: #2c5282; cursor: pointer; text-decoration: underline; }
.comment-field-label { font-size: 12px; font-weight: 600; color: #4a5568; }

.media-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    margin-top: 8px;
    border-top: 1px solid #ececec;
    background: linear-gradient(to bottom, #fafbfc, #f3f5f8);
    border-radius: 0 0 8px 8px;
}
.media-share-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin-right: 4px;
    width: 100%;
    flex-basis: 100%;
    margin-bottom: 2px;
}
.media-share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    height: 2.1rem;
    padding: 0 0.4rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-decoration: none;
    color: #fff;
    border: 0;
    line-height: 1.1;
}
.media-share-link--fb { background: #1877f2; }
.media-share-link--x { background: #0f1419; }
.media-share-link--in { background: #0a66c2; }
.media-share-link--wa { background: #25d366; }
.media-share-link--tg { background: #26a5e4; }
.media-share-link--reddit { background: #ff4500; }
.media-share-link--mail { background: #64748b; }
.media-share-link--copy { background: #fff; color: #334155; border: 1px solid #cbd5e1; min-height: 2.1rem; }

.medias-auth-modal { display: none; position: fixed; inset: 0; z-index: 100000; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; }
.medias-auth-modal.is-open { display: flex; }
.medias-auth-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); cursor: pointer; }
.medias-auth-modal-dialog { position: relative; width: 100%; max-width: 440px; max-height: min(90vh, 640px); overflow: auto; background: #fff; border-radius: 14px; box-shadow: 0 24px 48px rgba(0,0,0,0.2); border: 1px solid #e2e8f0; }
.medias-auth-modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid #edf2f7; }
.medias-auth-modal-header h2 { margin: 0; font-size: 1.1rem; font-weight: 700; color: #1a365d; }
.medias-auth-modal-close { border: none; background: #f1f5f9; color: #475569; width: 36px; height: 36px; border-radius: 8px; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.medias-auth-tabs { display: flex; padding: 0 18px; border-bottom: 1px solid #edf2f7; }
.medias-auth-tabs button { flex: 1; padding: 12px 8px; border: none; background: transparent; font-size: 14px; font-weight: 600; color: #64748b; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.medias-auth-tabs button.is-active { color: #1a365d; border-bottom-color: #2c5282; }
.medias-auth-modal-body { padding: 16px 18px 20px; }
.medias-auth-pane label { display: block; font-size: 12px; font-weight: 600; color: #475569; margin-bottom: 4px; }
.medias-auth-pane input[type="text"],
.medias-auth-pane input[type="email"],
.medias-auth-pane input[type="tel"],
.medias-auth-pane input[type="password"] { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; margin-bottom: 12px; }
.medias-auth-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.medias-auth-btn-primary { width: 100%; padding: 12px; border: none; border-radius: 8px; background: #2c5282; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 4px; }
.medias-auth-btn-success { background: #276749; }
.medias-auth-notif { font-size: 13px; padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.medias-auth-notif--info { background: #ebf8ff; color: #2c5282; }
.medias-auth-notif--ok { background: #c6f6d5; color: #22543d; }
.medias-auth-notif--err { background: #fed7d7; color: #822727; }
.medias-auth-notif--warn { background: #feebc8; color: #744210; }
.medias-auth-forgot { display: block; margin-top: 8px; font-size: 13px; }
.medias-auth-google p { font-size: 13px; color: #64748b; }
.medias-auth-google a { display: inline-flex; align-items: center; gap: 8px; }

@media (max-width: 520px) {
    .engagement-actions { gap: 3px; }
    .engagement-dual { min-width: 58px; }
    .engagement-dual .engagement-btn { padding: 4px 3px; font-size: 10px; }
    .engagement-comments .comment-submit { align-self: stretch; width: 100%; }
}
