/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 400px;
    font-size: 0.875rem;
    color: var(--gray-900);
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

/* Loading States */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Post Actions - Interactive States */
.post-action.liked {
    color: var(--primary-600);
}

.post-action.liked svg {
    fill: var(--primary-600);
}

.suitcase-btn.active.good {
    color: #10b981;
}

.suitcase-btn.active.bad {
    color: #ef4444;
}

.suitcase-btn:active {
    transform: scale(0.95);
}

/* Comment Input Animation */
.comment-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

/* Smooth Transitions */
.post-card,
.media-item,
.service-item {
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Titre du post dans le feed */
.post-card .post-title {
    font-weight: 700;
    font-size: 1.0625rem;
    color: var(--gray-900, #111827);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

/* Liens entreprise (avatar + nom) vers le profil */
.post-card .post-company-link {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}
.post-card .post-company-link:hover {
    text-decoration: none;
    opacity: 0.9;
}
.post-card .post-company-link.post-company-name h4 {
    color: var(--gray-900, #111827);
    margin: 0;
}
.post-card .post-company-link.post-company-name:hover h4 {
    color: var(--primary-500, #1F3A5F);
    text-decoration: underline;
}

/* Lien titre du post vers le détail */
.post-card .post-title-link {
    color: var(--primary-600, #192e4c);
    text-decoration: none;
    cursor: pointer;
}
.post-card .post-title-link:hover {
    color: var(--primary-500, #1F3A5F);
    text-decoration: underline;
}

.post-card:hover,
.media-item:hover {
    transform: translateY(-2px);
}

/* AJAX Loading Overlay */
.ajax-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.ajax-loading-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.ajax-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Success/Error States */
.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select {
    border-color: #ef4444;
}

.form-group.has-success input,
.form-group.has-success textarea,
.form-group.has-success select {
    border-color: #10b981;
}

/* Facebook Video / Reel : lecteur en iframe (plugins/video.php, 500x280) */
.facebook-video-embed-inline {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 1rem auto;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 500 / 280;
    max-height: none;
}
.facebook-video-embed-inline .fb-video-iframe-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.facebook-video-embed-inline .fb-video-iframe-wrap iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
}
.facebook-video-embed-inline .facebook-video-fallback {
    margin: 0.5rem 0 0;
    padding: 0.5rem 0;
    font-size: 0.8125rem;
    color: var(--text-secondary, #65676b);
    text-align: center;
}
.facebook-video-embed-inline .facebook-video-fallback a {
    color: var(--primary-color, #1F3A5F);
    text-decoration: underline;
}
.facebook-video-embed-inline .facebook-video-fallback a:hover {
    text-decoration: none;
}

/* Lien simple quand l’URL est locale (0.0.0.0, etc.) et ne doit pas être passée au lecteur */
.facebook-video-link-card {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
    padding: 0.75rem 1rem;
    max-width: 320px;
    background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
}
.facebook-video-link-card:hover { color: #fff; }
.facebook-video-link-icon {
    width: 20px; height: 20px; flex-shrink: 0;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpolygon points='5 3 19 12 5 21 5 3'/%3E%3C/svg%3E") center/contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpolygon points='5 3 19 12 5 21 5 3'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* WhatsApp Action Bar - Premium Design */
/* Post Action Bar (Bottom of content) */
.post-action-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-top: 1rem;
    background: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.post-action-bar .action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.post-action-bar .whatsapp-btn {
    background: #25D366;
    color: white;
    border: none;
}

.post-action-bar .whatsapp-btn:hover {
    background: #20ba5a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.post-action-bar .add-to-cart-btn {
    background: var(--primary-500, #3b82f6);
    color: white;
    border: none;
}

.post-action-bar .add-to-cart-btn:hover {
    background: var(--primary-600, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.post-action-bar .action-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.post-action-bar .action-btn span {
    font-size: 0.875rem;
    line-height: 1;
}

/* Old WhatsApp styles (keep for backward compatibility) */
.whatsapp-action-bar {
    display: flex;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.08) 0%, rgba(32, 186, 90, 0.08) 100%);
    border: 1px solid rgba(37, 211, 102, 0.2);
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-action-bar:hover {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.12) 0%, rgba(32, 186, 90, 0.12) 100%);
    border-color: rgba(37, 211, 102, 0.3);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.15);
}

.whatsapp-button-bar {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%) !important;
    color: white !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 0.9375rem !important;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100%;
    max-width: 200px;
}

.whatsapp-button-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s ease;
}

.whatsapp-button-bar:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4) !important;
    background: linear-gradient(135deg, #20BA5A 0%, #1DA851 100%) !important;
}

.whatsapp-button-bar:hover::before {
    left: 100%;
}

.whatsapp-button-bar:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3) !important;
}

.whatsapp-button-bar svg {
    flex-shrink: 0 !important;
    width: 20px !important;
    height: 20px !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.whatsapp-button-bar span {
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Legacy support for old whatsapp-button class */
.whatsapp-mention {
    display: inline-block;
    margin: 0.5rem 0;
}

.whatsapp-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.625rem !important;
    background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%) !important;
    color: white !important;
    padding: 0.625rem 1.25rem !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    margin: 0.5rem 0 !important;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Post Links */
.post-link {
    color: var(--primary-500);
    text-decoration: underline;
    word-break: break-all;
}

.post-link:hover {
    color: var(--primary-600);
    text-decoration: none;
}

/* ============================================
   SHARED LINK PREVIEW CARDS - PREMIUM DESIGN
   Better than Facebook's rendering
   ============================================ */

.shared-link-preview {
    margin: 1.25rem 0;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.shared-link-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-500, #1F3A5F) 0%, var(--primary-600, #192e4c) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shared-link-preview:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.shared-link-preview:hover::before {
    opacity: 1;
}

.shared-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

/* Image Section */
.shared-link-image-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

.shared-link-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.shared-link-preview:hover .shared-link-image {
    transform: scale(1.05);
}

.shared-link-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.02) 100%);
    pointer-events: none;
}

.shared-link-image-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

/* Body Section */
.shared-link-body {
    padding: 1.25rem 1.5rem;
    background: #ffffff;
}

.shared-link-header {
    margin-bottom: 0.75rem;
}

.shared-link-site-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.375rem 0.75rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.shared-link-preview:hover .shared-link-site-badge {
    background: rgba(0, 0, 0, 0.05);
    color: #4b5563;
}

.shared-link-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    opacity: 0.7;
}

.shared-link-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.625rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.shared-link-preview:hover .shared-link-title {
    color: var(--primary-500, #1F3A5F);
}

.shared-link-description {
    font-size: 0.9375rem;
    color: #4b5563;
    margin: 0 0 1rem 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shared-link-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.shared-link-url {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--primary-500, #1F3A5F);
    word-break: break-all;
    transition: color 0.2s ease;
}

.shared-link-preview:hover .shared-link-url {
    color: var(--primary-600, #192e4c);
}

.shared-link-url svg {
    flex-shrink: 0;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.shared-link-preview:hover .shared-link-url svg {
    transform: translate(2px, -2px);
}

/* Compact variant (no image) */
.shared-link-preview:not(:has(.shared-link-image-wrapper)) .shared-link-body {
    padding: 1.5rem;
}

.shared-link-preview:not(:has(.shared-link-image-wrapper)) .shared-link-image-wrapper {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .shared-link-preview {
        margin: 1rem 0;
        border-radius: 10px;
    }
    
    .shared-link-image-wrapper {
        height: 220px;
    }
    
    .shared-link-body {
        padding: 1rem 1.25rem;
    }
    
    .shared-link-title {
        font-size: 1rem;
    }
    
    .shared-link-description {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .shared-link-image-wrapper {
        height: 180px;
    }
    
    .shared-link-body {
        padding: 0.875rem 1rem;
    }
    
    .shared-link-site-badge {
        font-size: 0.625rem;
        padding: 0.25rem 0.5rem;
    }
}

.form-error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 4px;
}

.form-success-message {
    color: #10b981;
    font-size: 0.75rem;
    margin-top: 4px;
}

/* Hashtags and Mentions Styles */
.hashtag-link,
.mention-link {
    color: var(--primary-color, #007bff);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
}

.hashtag-link:hover,
.mention-link:hover {
    background-color: rgba(0, 123, 255, 0.1);
    text-decoration: underline;
}

.hashtag-link {
    color: var(--primary-500, #1F3A5F);
}

.mention-link {
    color: var(--success-color, #28a745);
}

/* Contenu de post : respect de la mise en page (éditeur riche Quill) */
.post-content {
    line-height: 1.6;
    word-wrap: break-word;
    color: #1f2937;
    font-size: 0.9375rem;
}

.post-content p {
    margin: 0 0 0.75em;
}
.post-content p:last-child {
    margin-bottom: 0;
}

.post-content ul,
.post-content ol {
    margin: 0.5em 0 1em;
    padding-left: 1.5em;
}
.post-content ul {
    list-style-type: disc;
}
.post-content ol {
    list-style-type: decimal;
}
.post-content li {
    margin: 0.25em 0;
}

.post-content strong,
.post-content b {
    font-weight: 700;
}
.post-content em,
.post-content i {
    font-style: italic;
}
.post-content u {
    text-decoration: underline;
}

.post-content br {
    display: block;
    content: "";
    margin-top: 0.25em;
}

.post-content a {
    text-decoration: none;
}

/* Lire la suite : limiter la hauteur du contenu (~7 lignes), bouton affiché si débordement */
.post-content-inner {
    overflow: hidden;
    max-height: 11.2em; /* 7 lignes × line-height 1.6 */
    transition: max-height 0.25s ease;
}
.post-content.post-content-expanded .post-content-inner {
    max-height: none;
}
.post-content-lire-suite {
    display: none;
    margin-top: 0.5rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary-500, #1F3A5F);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}
.post-content-lire-suite:hover {
    background: rgba(31, 58, 95, 0.08);
    color: var(--primary-600, #16324d);
}
.post-content.post-content-has-more .post-content-lire-suite {
    display: inline-block;
}

/* WhatsApp Button - Premium Design */
.whatsapp-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.625rem !important;
    background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%) !important;
    color: white !important;
    padding: 0.625rem 1.25rem !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    margin: 0.5rem 0 !important;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    cursor: pointer !important;
    position: relative !important;
    overflow: hidden !important;
}

.whatsapp-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.whatsapp-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4) !important;
    background: linear-gradient(135deg, #20BA5A 0%, #1DA851 100%) !important;
}

.whatsapp-button:hover::before {
    left: 100%;
}

.whatsapp-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3) !important;
}

.whatsapp-button svg {
    flex-shrink: 0 !important;
    width: 18px !important;
    height: 18px !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.whatsapp-button span {
    white-space: nowrap;
}

.whatsapp-mention {
    display: inline-block;
    margin: 0.5rem 0;
}

/* Animation for new comments - smoother */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Smooth fade-in for comments */
.comment-item {
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.comment-item.comment-reply {
    animation: slideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* YouTube Embed Styles */
.youtube-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
    margin: 1rem 0;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
}

.youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1;
}

/* YouTube embed inline (from text content) */
.youtube-embed-inline {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background-color: #000;
    margin: 1rem 0;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.youtube-embed-inline iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 1;
}

/* Media Preview Styles */
.media-preview-content {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--gray-50, #f9fafb);
    border-radius: 8px;
    position: relative;
}

.media-preview-content img,
.media-preview-content video {
    max-width: 100%;
    border-radius: 8px;
    display: block;
}

.btn-remove-media {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-remove-media:hover {
    background: #dc2626;
}

/* Post interactors preview (5 avatars + +N) */
.post-interactors-preview {
    display: flex;
    align-items: center;
    padding: 0.3rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
    user-select: none;
}

.post-interactors-preview:hover .post-interactors-avatars {
    opacity: 0.9;
}

.post-interactors-avatars {
    display: flex;
    align-items: center;
    gap: 0;
}

.post-interactor-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--gray-100, #f3f4f6);
    margin-left: -6px;
    flex-shrink: 0;
    background: var(--gray-200, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--gray-600, #4b5563);
    font-size: 10px;
    font-weight: 600;
}

.post-interactor-avatar:first-child {
    margin-left: 0;
}

.post-interactor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-interactors-more {
    margin-left: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500, #6b7280);
    min-width: 1.5rem;
}

/* Post interactions modal */
.post-interactions-modal-content {
    max-width: 420px;
    width: 100%;
}

.post-interactions-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200, #e5e7eb);
    padding-bottom: 0.5rem;
}

.post-interactions-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--gray-600, #4b5563);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.post-interactions-tab:hover {
    background: var(--gray-100, #f3f4f6);
    color: var(--gray-800, #1f2937);
}

.post-interactions-tab.active {
    background: var(--primary-100, rgba(37, 99, 235, 0.1));
    color: var(--primary-600, #2563eb);
}

.post-interactions-tab .tab-count {
    font-weight: 600;
    font-size: 0.8rem;
}

.post-interactions-panels {
    min-height: 180px;
}

.post-interactions-panel {
    display: none;
}

.post-interactions-panel.active {
    display: block;
}

.post-interactions-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.post-interactions-list .interaction-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
}

.post-interactions-list .interaction-item:hover {
    background: var(--gray-50, #f9fafb);
}

.interaction-item-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gray-200, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600, #4b5563);
}

.interaction-item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.interaction-item-name {
    font-weight: 500;
    font-size: 0.9375rem;
}

.post-interactions-empty {
    font-size: 0.875rem;
    color: var(--gray-500, #6b7280);
    margin: 0;
    padding: 0.75rem 0;
}

.post-interactions-empty.hidden {
    display: none;
}

.post-interactions-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: var(--gray-500, #6b7280);
    font-size: 0.875rem;
}

.post-interactions-loading .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-200, #e5e7eb);
    border-top-color: var(--primary-500, #3b82f6);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Modal Modifier la publication */
.edit-post-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.edit-post-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}
.edit-post-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow: auto;
}
.edit-post-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}
.edit-post-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}
.edit-post-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
}
.edit-post-modal-close:hover {
    color: #111827;
}
.edit-post-form {
    padding: 1.5rem;
}
.edit-post-field {
    margin-bottom: 1rem;
}
.edit-post-field label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: #374151;
}
.edit-post-field label .required {
    color: #dc2626;
}
.edit-post-field input,
.edit-post-field textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
}
.edit-post-field textarea {
    resize: vertical;
    min-height: 120px;
}
.edit-post-char-count {
    display: block;
    text-align: right;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.25rem;
}
.edit-post-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}
.edit-post-modal-actions .btn-secondary {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    font-size: 0.875rem;
}
.edit-post-modal-actions .btn-primary {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: var(--primary-color, #1F3A5F);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
}
.edit-post-modal-actions .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}/* Edit post – médias (liste + ajout) */
.edit-post-media-field {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}
.edit-post-media-field > label {
    display: block;
    margin-bottom: 0.5rem;
}
.edit-post-media-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    min-height: 0;
}
.edit-post-media-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}
.edit-post-media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.edit-post-media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.edit-post-media-item .edit-post-media-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}
.edit-post-media-item .edit-post-media-remove:hover {
    background: #dc2626;
}
.edit-post-media-item.to-delete {
    opacity: 0.5;
}
.edit-post-media-item.to-delete::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    border-radius: 8px;
}
.edit-post-media-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.edit-post-add-images-btn,
.edit-post-add-videos-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4b5563;
}
.edit-post-add-images-btn:hover,
.edit-post-add-videos-btn:hover {
    border-color: var(--primary-color, #1F3A5F);
    color: var(--primary-color, #1F3A5F);
    background: #f0f7ff;
}
.edit-post-new-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 0.25rem;
    margin-top: 0.5rem;
}
.edit-post-new-preview .edit-post-new-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    background: #f3f4f6;
}
.edit-post-new-preview .edit-post-new-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.edit-post-new-preview .edit-post-new-preview-item span {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.edit-post-new-preview .edit-post-new-preview-item span:hover {
    background: #dc2626;
}