/**
 * Bundle Feed Stream — Styles flux de publications (feed, formations, marketplace)
 * Sources : feed + publications + feed-tabs + widget-collapse + ad-carousel
 * Sprint 4 — Consolidation CSS
 */

/* ============================================================
 * SOURCE: feed.css
 * ============================================================ */
/**
 * Styles pour la page Feed (Fil d'actualités)
 * BookConnect - Fil d'actualités et publications
 */

/* ============================================
   RÉACTIONS ET INTERACTIONS
   ============================================ */

/* Styles pour les réactions actives */
.reaction-active {
    font-weight: 600;
    box-shadow: 0 0 0 2px currentColor;
}

/* Styles pour les boutons like/dislike des commentaires */
.comment-actions {
    margin-top: 8px;
}

.comment-like-btn,
.comment-dislike-btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    transition: all 0.2s ease;
}

.comment-like-btn:hover {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    transform: translateY(-1px);
}

.comment-dislike-btn:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: translateY(-1px);
}

.comment-like-btn:active,
.comment-dislike-btn:active {
    transform: scale(0.95);
}

/* ============================================
   INDICATEURS DE CHARGEMENT
   ============================================ */

/* Indicateur de chargement */
.upload-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,123,255,0.1);
    border: 2px dashed #007bff;
    border-radius: 8px;
    padding: 20px;
    color: #007bff;
    font-size: 14px;
    min-height: 100px;
    margin: 10px 0;
}

.spinner-border {
    width: 1rem;
    height: 1rem;
    margin-right: 8px;
}

/* ============================================
   ÉDITEUR AVANCÉ
   ============================================ */

/* Éditeur personnalisé */
.advanced-editor {
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

.editor-toolbar {
    display: flex;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.toolbar-group {
    display: flex;
    gap: 5px;
}

.editor-content {
    min-height: 200px;
    padding: 15px;
    outline: none;
}

.editor-content:focus {
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.editor-content img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ============================================
   LIENS ET HASHTAGS
   ============================================ */

/* Styles pour les liens et hashtags dans l'éditeur */
.editor-content a {
    color: #0d6efd;
    text-decoration: underline;
    cursor: pointer;
}

.editor-content a:hover {
    color: #0a58ca;
    text-decoration: underline;
}

.editor-content .hashtag {
    color: #0d6efd;
    font-weight: 600;
    cursor: pointer;
}

.editor-content .hashtag:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/* Styles pour les liens et hashtags dans les publications affichées */
.publication-body a {
    color: #0d6efd;
    text-decoration: underline;
}

.publication-body a:hover {
    color: #0a58ca;
}

.publication-body .hashtag {
    color: #0d6efd;
    font-weight: 600;
    cursor: pointer;
}

.publication-body .hashtag:hover {
    color: #0a58ca;
    text-decoration: underline;
}

/* ============================================
   CONTRÔLES DES IMAGES DANS L'ÉDITEUR
   ============================================ */

/* Contrôles des images dans l'éditeur */
.editor-image-container {
    position: relative;
    margin: 15px 0;
    display: block;
    max-width: 100%;
}

.editor-image {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    display: block;
}

.editor-image:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.image-controls {
    position: static;
    background: rgba(0,0,0,0.05);
    border-radius: 6px;
    padding: 8px;
    opacity: 1;
    visibility: visible;
    transition: all 0.3s ease;
    display: flex;
    gap: 8px;
    flex-direction: column;
    margin-top: 10px;
    margin-bottom: 15px; /* Espacement fixe sous chaque contrôle */
    border: 1px solid #e0e0e0;
}

.size-controls, .align-controls {
    display: flex;
    gap: 4px;
}

.image-controls .btn {
    padding: 6px 12px;
    font-size: 12px;
    background: rgba(255,255,255,0.9);
    border: 1px solid #ddd;
    color: #333;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.image-controls .btn:hover {
    background: white;
    border-color: #007bff;
    color: #007bff;
    transform: none;
}

.image-controls .btn-outline-danger {
    background: rgba(220, 53, 69, 0.9);
    color: white;
}

.image-controls .btn-outline-danger:hover {
    background: #dc3545;
}

/* Alignements des images (sans floats pour éviter les problèmes de structure) */
.editor-image-container.align-left {
    text-align: left;
}

.editor-image-container.align-right {
    text-align: right;
}

.editor-image-container.align-center {
    text-align: center;
}

/* L'image elle-même reste block pour éviter les problèmes */
.editor-image-container .editor-image {
    display: inline-block;
    max-width: 100%;
    height: auto;
}

/* ============================================
   BOUTON CRÉER UNE PUBLICATION
   ============================================ */

/* Bouton principal pour créer une publication */
#toggleEditorBtn {
    font-size: 1.1rem;
    padding: 12px 30px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
}

#toggleEditorBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

#toggleEditorBtn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

#toggleEditorBtn i {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* ============================================
   SECTION D'ÉDITION
   ============================================ */

/* Section d'édition */
.editor-section {
    border: 2px solid #007bff;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.editor-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff 0%, #0056b3 100%);
}

.editor-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-bottom: 2px solid #0056b3;
    color: white;
}

.editor-header h5 {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ============================================
   STRUCTURE DES PUBLICATIONS
   ============================================ */

/* Structure des publications */
.publication-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.publication-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.publication-header {
    background: #f8f9fa;
    border-bottom: none;
    padding: 15px 20px;
}

/* Vignette photo utilisateur dans l'en-tête de publication */
.publication-header img.rounded-circle {
    width: 96px !important;
    height: 96px !important;
    min-width: 96px;
    min-height: 96px;
    max-width: 96px;
    max-height: 96px;
    object-fit: cover;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.publication-header img.rounded-circle:hover {
    border-color: #007bff;
    box-shadow: 0 3px 8px rgba(0,123,255,0.3);
    transform: scale(1.05);
}

.publication-content {
    line-height: 1.6;
    margin-bottom: 15px;
}

.publication-content p {
    margin-bottom: 12px;
}

.publication-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 10px 0;
}

/* Troncature du contenu à 6 lignes */
.publication-content-preview {
    position: relative;
    max-height: calc(1.6em * 4); /* 4 lignes avec line-height de 1.6 */
    overflow: hidden;
    line-height: 1.6;
    margin-bottom: 0;
}

.publication-content-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4em;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,1) 100%);
    pointer-events: none;
    z-index: 1;
}

.publication-content-full {
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bouton Lire la suite */
.publication-content-wrapper .btn {
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.publication-content-wrapper .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.publication-content-wrapper .btn i {
    margin-right: 6px;
    transition: transform 0.3s ease;
}

.publication-content-wrapper .btn:hover i {
    transform: scale(1.2);
}

.publication-image {
    text-align: center;
}

.publication-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.publication-separator {
    margin: 0;
    border-color: #dee2e6;
    opacity: 0.6;
}

.publication-footer {
    background: #fff;
    border-top: none;
    padding: 15px 20px;
}

.reaction-buttons .btn {
    margin-right: 8px;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.875rem;
}

.reaction-buttons .btn:last-child {
    margin-right: 0;
}

.comment-count {
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ============================================
   TAGS DES PUBLICATIONS
   ============================================ */

.publication-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}

.pub-feed-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1.4;
    white-space: nowrap;
    text-shadow: 0 1px 1px rgba(0,0,0,0.15);
}

/* Selecteur de tags (editeur inline) */
.pub-tags-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 30px;
}

.pub-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 15px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
}

.pub-tag-remove {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    line-height: 1;
    padding: 0 0 0 2px;
    cursor: pointer;
}

.pub-tag-remove:hover {
    color: #fff;
}

.pub-tag-panel {
    margin-top: 8px;
    border: 1px solid #dee2e6;
    border-radius: 0.4rem;
    background: #fff;
    max-height: 320px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pub-tag-panel-header {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.pub-tag-panel-header input {
    flex: 1;
}

.pub-tag-panel-body {
    overflow-y: auto;
    padding: 10px;
    max-height: 240px;
}

.pub-tag-category {
    margin-bottom: 10px;
}

.pub-tag-category-label {
    font-weight: 600;
    font-size: 0.78rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.pub-tag-category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.pub-tag-option {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 15px;
    border: 2px solid #dee2e6;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
    background: #fff;
    color: #374151;
}

.pub-tag-option:hover {
    background: #f0f0f0;
}

.pub-tag-option.selected {
    background: #e8f5e9;
    border-color: #4caf50;
    font-weight: 600;
}

.pub-tag-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* ============================================
   SÉPARATEUR ÉDITEUR / PUBLICATIONS
   ============================================ */

/* Séparateur entre l'éditeur et les publications */
.editor-publications-separator {
    margin: 40px 0 30px 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.separator-line {
    flex: 1;
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #007bff 20%, #007bff 80%, transparent 100%);
    margin: 0 20px;
}

.separator-content {
    background: white;
    padding: 0 20px;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.separator-content i {
    color: #007bff;
    font-size: 1rem;
}

.separator-content span {
    white-space: nowrap;
}

/* Section des publications */
.publications-section {
    margin-top: 20px;
}

/* ============================================
   COMMENTAIRES
   ============================================ */

/* Commentaires */
.comments-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

/* Vignette photo utilisateur dans les commentaires */
.comment-item img.rounded-circle,
.comments-list img.rounded-circle,
.comments-section img.rounded-circle {
    width: 64px !important;
    height: 64px !important;
    min-width: 64px;
    min-height: 64px;
    max-width: 64px;
    max-height: 64px;
    object-fit: cover;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.comment-item img.rounded-circle:hover,
.comments-list img.rounded-circle:hover,
.comments-section img.rounded-circle:hover {
    border-color: #007bff;
    box-shadow: 0 3px 8px rgba(0,123,255,0.3);
    transform: scale(1.05);
}

.comments-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.comments-form .input-group {
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.comments-form .form-control {
    border: none;
    padding: 12px 20px;
    font-size: 0.9rem;
}

.comments-form .form-control:focus {
    box-shadow: none;
    outline: none;
}

.comments-form .btn {
    border-radius: 0 25px 25px 0;
    padding: 12px 20px;
    border: none;
}

.comment-item {
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.comment-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-header strong {
    color: #495057;
    font-size: 0.9rem;
}

.comment-header small {
    font-size: 0.8rem;
}

.comment-content {
    color: #212529;
    line-height: 1.4;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Responsive pour les commentaires */
@media (max-width: 768px) {
    .comments-section {
        padding: 12px;
    }

    .comment-item {
        padding: 10px;
    }

    .comments-form .input-group {
        flex-direction: column;
    }

    .comments-form .btn {
        border-radius: 0 0 25px 25px;
        margin-top: 8px;
    }
}

/* ============================================================
 * SOURCE: publications.css
 * ============================================================ */
/**
 * STYLES POUR LES PUBLICATIONS - BookConnect
 * Fichier dédié à l'affichage et aux interactions des publications
 */

/* ========================================
   ISOLATION ET STRUCTURE DES PUBLICATIONS
   ======================================== */

/* Isolation stricte de chaque publication */
.publication-item {
    display: block;
    position: relative;
    isolation: isolate; /* Crée un nouveau contexte d'empilement */
    margin-bottom: 1rem;
}

/* Force la fermeture de toutes les balises flottantes */
.publication-item::after {
    content: "";
    display: table;
    clear: both;
}

/* Carte de publication */
.publication-card {
    overflow: visible;
}

/* ========================================
   TRONCATURE DU CONTENU
   ======================================== */

/* Contenu avec troncature automatique */
.publication-content-preview {
    max-height: 180px; /* Réduit à 180px pour tronquer plus de publications */
    overflow: hidden;
    position: relative;
    transition: max-height 0.8s ease-in-out;
}

/* État déplié - IMPORTANT : max-height doit être none pour afficher TOUT le contenu */
.publication-content-preview.expanded {
    max-height: none !important;
    overflow: visible;
    transition: none; /* Pas d'animation au déploiement pour éviter les coupures */
}

/* Effet de fondu en bas pour le contenu tronqué - UNIQUEMENT quand NON déplié */
.publication-content-preview:not(.expanded)::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    pointer-events: none;
    z-index: 1;
}

/* Supprimer l'effet de flou quand déplié */
.publication-content-preview.expanded::after {
    display: none !important;
}

/* Sécurité : empêcher le contenu de déborder */
.publication-content-preview * {
    max-width: 100%;
}

/* Wrapper de contenu isolé - Isolation du contenu utilisateur */
.publication-content-isolated {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ========================================
   BOUTONS "LIRE LA SUITE" / "RÉDUIRE"
   ======================================== */

/* Container du bouton */
[id^="read-more-btn-"] {
    text-align: center;
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e9ecef;
}

/* Style du bouton */
[id^="read-more-btn-"] button {
    min-width: 150px;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Effet hover sur le bouton */
[id^="read-more-btn-"] button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ========================================
   EN-TÊTE DE PUBLICATION
   ======================================== */

.publication-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.publication-header img {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

/* ========================================
   CORPS DE PUBLICATION
   ======================================== */

.publication-body {
    padding: 1.25rem;
}

.publication-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0d6efd;
    margin-bottom: 1rem;
}

/* ========================================
   IMAGES DE PUBLICATION
   ======================================== */

.publication-image {
    margin-top: 1rem;
    text-align: center;
}

.publication-image img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 0.375rem;
}

/* ========================================
   SÉPARATEURS
   ======================================== */

.publication-separator {
    margin: 0.5rem 0;
    border-color: #dee2e6;
}

.editor-publications-separator {
    margin: 2rem 0;
    position: relative;
    text-align: center;
}

.editor-publications-separator .separator-line {
    border-top: 2px solid #dee2e6;
}

.editor-publications-separator .separator-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 0 1rem;
    color: #6c757d;
    font-weight: 500;
}

.editor-publications-separator .separator-content i {
    margin-right: 0.5rem;
}

/* ========================================
   PIED DE PUBLICATION (RÉACTIONS)
   ======================================== */

.publication-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 0.75rem 1.25rem;
}

.reaction-buttons {
    gap: 0.5rem;
}

.reaction-buttons button {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Indicateur visuel pour les réactions actives */
.reaction-active {
    font-weight: 600;
    opacity: 0.9;
}

.interaction-buttons {
    gap: 0.5rem;
}

/* ========================================
   COMMENTAIRES
   ======================================== */

.comments-section {
    padding: 1rem;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.comment-item {
    padding: 0.75rem;
    background: white;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
}

.comment-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.comment-header {
    font-size: 0.875rem;
}

.comment-content {
    margin-top: 0.5rem;
    color: #212529;
}

.comment-actions {
    margin-top: 0.5rem;
}

.comment-like-btn,
.comment-dislike-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* ========================================
   PUBLICITÉS
   ======================================== */

.ad-banner {
    background-color: #fff9e6;
    border-left: 4px solid #ffc107;
}

.ad-banner .card-body {
    padding: 1.5rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .publication-content-preview {
        max-height: 180px;
    }
    
    [id^="read-more-btn-"] button {
        min-width: 120px;
        font-size: 0.875rem;
    }
    
    .reaction-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .reaction-buttons button {
        width: 100%;
    }
}

/* ========================================
   ANIMATIONS ET TRANSITIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.publication-item {
    animation: fadeIn 0.3s ease-in-out;
}

/* Transition fluide pour les boutons */
button {
    transition: all 0.2s ease-in-out;
}

/* ========================================
   UTILITAIRES
   ======================================== */

/* Empêcher la sélection du texte sur les boutons */
.reaction-buttons button,
.interaction-buttons button,
[id^="read-more-btn-"] button {
    user-select: none;
}

/* État de chargement */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   MENU AUTEUR (dropdown custom sans Bootstrap)
   ======================================== */

.author-menu {
    position: relative;
}

.author-menu-toggle {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
    font-size: 1.1rem;
    padding: 0;
}

.author-menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.08);
    color: #333;
}

.author-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1050;
    min-width: 190px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.25rem 0;
    margin-top: 4px;
}

.author-menu-dropdown.open {
    display: block;
}

.author-menu-dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: #212529;
    text-decoration: none;
    white-space: nowrap;
}

.author-menu-dropdown a:hover {
    background-color: #f8f9fa;
}

.author-menu-dropdown a.text-danger {
    color: #dc3545 !important;
}

.author-menu-dropdown hr {
    margin: 0.25rem 0;
    border-top: 1px solid #e9ecef;
}

/* Edition inline dans la carte */
.inline-edit-form {
    padding: 0.5rem 0;
}

.inline-edit-toolbar {
    padding: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem 0.375rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.inline-edit-toolbar .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    line-height: 1;
}

.inline-edit-content {
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    padding: 0.75rem;
    min-height: 150px;
    max-height: 400px;
    overflow-y: auto;
    background: #fff;
}

.inline-edit-content:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.inline-edit-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 8px 0;
}

/* Restaurer les styles de listes (supprimes par Bulma: ol,ul { list-style:none; margin:0; padding:0 }) */
.inline-edit-content ul,
.publication-content-isolated ul,
.publication-body ul,
.publication-content-preview ul,
[contenteditable="true"] ul {
    list-style: disc !important;
    list-style-type: disc !important;
    padding-left: 2rem !important;
    margin: 0.5rem 0 !important;
}

.inline-edit-content ol,
.publication-content-isolated ol,
.publication-body ol,
.publication-content-preview ol,
[contenteditable="true"] ol {
    list-style: decimal !important;
    list-style-type: decimal !important;
    padding-left: 2rem !important;
    margin: 0.5rem 0 !important;
}

.inline-edit-content li,
.publication-content-isolated li,
.publication-body li,
.publication-content-preview li,
[contenteditable="true"] li {
    display: list-item !important;
    margin-bottom: 0.25rem;
}

/* ============================================================
 * SOURCE: components/feed-tabs.css
 * ============================================================ */
/* =====================================================
   Feed Tabs - Onglets du fil d'actualités
   ===================================================== */

.feed-tabs-container {
    position: relative;
    margin-bottom: 16px;
}

.feed-tabs-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 2px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #c4c4c4 transparent;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0;
}

.feed-tabs-nav::-webkit-scrollbar {
    height: 4px;
}

.feed-tabs-nav::-webkit-scrollbar-thumb {
    background: #c4c4c4;
    border-radius: 2px;
}

.feed-tab {
    padding: 10px 16px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 500;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: -2px;
    user-select: none;
}

.feed-tab:hover {
    color: #4a6fa5;
    background: rgba(74, 111, 165, 0.05);
    border-radius: 8px 8px 0 0;
}

.feed-tab.active {
    color: #4a6fa5;
    border-bottom-color: #4a6fa5;
    font-weight: 600;
}

.feed-tab i {
    font-size: 0.82rem;
}

.feed-tab-add {
    border-bottom: none !important;
    padding: 10px 12px;
}

.feed-tab-add a {
    color: #6c757d;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: all 0.2s;
}

.feed-tab-add a:hover {
    color: #4a6fa5;
    background: rgba(74, 111, 165, 0.1);
}

/* Loading state */
.feed-loading {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.feed-loading .spinner-border {
    width: 2rem;
    height: 2rem;
    margin-bottom: 15px;
    color: #4a6fa5;
}

.feed-loading p {
    font-size: 0.9rem;
    margin: 0;
}

/* Error state */
.feed-error {
    text-align: center;
    padding: 40px 20px;
    color: #dc3545;
}

.feed-error i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .feed-tabs-nav {
        -webkit-overflow-scrolling: touch;
    }

    .feed-tab {
        padding: 8px 12px;
        font-size: 0.82rem;
    }

    .feed-tab span {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ============================================================
 * SOURCE: components/widget-collapse.css
 * ============================================================ */
/* ============================================
   Widget Collapse - Toggle minimiser/développer
   ============================================ */

/* Bouton toggle dans le header */
.widget-collapse-toggle {
    background: none;
    border: none;
    color: #7c3aed;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    line-height: 1;
    transition: color 0.2s, transform 0.3s ease;
    flex-shrink: 0;
}

.widget-collapse-toggle:hover {
    color: #5b21b6;
}

/* Rotation du chevron quand collapsed */
.widget-collapsible.collapsed .widget-collapse-toggle {
    transform: rotate(-90deg);
}

/* Corps du widget (zone repliable) */
.widget-collapse-body {
    max-height: 2000px;
    overflow: hidden;
    opacity: 1;
    transition: max-height 0.35s ease, opacity 0.25s ease;
}

.widget-collapsible.collapsed .widget-collapse-body {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

/* Arrondir le bas du header quand collapsed */
.widget-collapsible.collapsed .pod-widget-header,
.widget-collapsible.collapsed .evt-widget-header,
.widget-collapsible.collapsed .nws-widget-header,
.widget-collapsible.collapsed .rss-widget-header,
.widget-collapsible.collapsed .ad-sidebar-header {
    border-radius: 10px;
    transition: border-radius 0.3s ease;
}

/* Curseur pointer sur tout le header */
.widget-collapsible .pod-widget-header,
.widget-collapsible .evt-widget-header,
.widget-collapsible .nws-widget-header,
.widget-collapsible .rss-widget-header,
.widget-collapsible .ad-sidebar-header {
    cursor: pointer;
    user-select: none;
}

/* ============================================================
 * SOURCE: components/ad-carousel.css
 * ============================================================ */
/* ===========================================
   Ad Carousel - Bandeau publicitaire décalé
   Asymétrique par rapport aux sections service
   =========================================== */

.ad-carousel-section {
    padding: 2.5rem 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
    position: relative;
    overflow: hidden;
}

.ad-carousel-section::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 0;
    right: 0;
    height: 60px;
    background: inherit;
    transform: skewY(-1.5deg);
    z-index: 0;
}

.ad-carousel-section::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    height: 60px;
    background: inherit;
    transform: skewY(-1.5deg);
    z-index: 0;
}

/* Conteneur décalé à droite pour casser la symétrie */
.ad-carousel-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.ad-carousel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-left: 8%;
}

.ad-carousel-header h3 {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

.ad-carousel-header .ad-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Track du carrousel - décalé à droite */
.ad-carousel-track {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-left: 8%;
    padding-right: 2rem;
    padding-bottom: 0.5rem;
}

.ad-carousel-track::-webkit-scrollbar {
    display: none;
}

/* Cartes pub - largeurs inégales pour l'asymétrie */
.ad-card {
    flex: 0 0 auto;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.ad-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Tailles variées pour casser la symétrie */
.ad-card--large {
    width: 380px;
    min-height: 200px;
}

.ad-card--medium {
    width: 300px;
    min-height: 180px;
}

.ad-card--small {
    width: 240px;
    min-height: 160px;
}

.ad-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.ad-card__overlay {
    position: relative;
    z-index: 1;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}

/* Carte sans image - fond dégradé coloré */
.ad-card--gradient-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ad-card--gradient-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.ad-card--gradient-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.ad-card--gradient-4 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.ad-card--gradient-5 {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.ad-card__content {
    position: relative;
    z-index: 1;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.ad-card__tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    width: fit-content;
}

.ad-card__title {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.3rem;
    line-height: 1.3;
}

.ad-card__desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.4;
}

/* Navigation du carrousel */
.ad-carousel-nav {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-right: 5%;
}

.ad-carousel-nav button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.ad-carousel-nav button:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-color: rgba(255, 255, 255, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .ad-carousel-header {
        padding-left: 1rem;
    }

    .ad-carousel-track {
        padding-left: 1rem;
        gap: 1rem;
    }

    .ad-card--large {
        width: 300px;
        min-height: 170px;
    }

    .ad-card--medium {
        width: 250px;
        min-height: 150px;
    }

    .ad-card--small {
        width: 200px;
        min-height: 140px;
    }

    .ad-carousel-nav {
        padding-right: 1rem;
    }
}

@media (max-width: 480px) {
    .ad-card--large,
    .ad-card--medium,
    .ad-card--small {
        width: 260px;
        min-height: 150px;
    }
}

/* ===========================================
   Variante Sidebar - Widget dans la colonne gauche
   Cartes empilées verticalement (~300px largeur)
   =========================================== */

/* Widget conteneur - même pattern que pod-widget / evt-widget */
.ad-sidebar-widget {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Header gradient - style cohérent avec podcasts/événements */
.ad-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    background: linear-gradient(to right, #f59e0b 0%, #ffffff 100%);
    color: #fff;
}

.ad-sidebar-title {
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ad-sidebar-title i {
    font-size: 0.75rem;
    opacity: 0.85;
}

.ad-sidebar-label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.9);
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Track vertical - cartes empilées */
.ad-sidebar-track {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.6rem;
    max-height: 370px;
    overflow-y: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

.ad-sidebar-track::-webkit-scrollbar {
    width: 4px;
}

.ad-sidebar-track::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

/* Carte pub sidebar - pleine largeur, compacte */
.ad-sidebar-card {
    display: block;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    min-height: 110px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ad-sidebar-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Image de fond */
.ad-sidebar-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* Overlay pour cartes avec image */
.ad-sidebar-card__overlay {
    position: relative;
    z-index: 1;
    padding: 0.75rem;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.15) 70%, transparent 100%);
}

/* Contenu pour cartes sans image (fond gradient) */
.ad-sidebar-card__content {
    position: relative;
    z-index: 1;
    padding: 0.75rem;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.ad-sidebar-card__sponsor {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
    width: fit-content;
}

.ad-sidebar-card__title {
    display: block;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.15rem;
}

.ad-sidebar-card__desc {
    display: block;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.7rem;
    line-height: 1.35;
}

/* Navigation haut/bas */
.ad-sidebar-nav {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.4rem 0.6rem 0.5rem;
}

.ad-sidebar-nav button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background: #f8f9fa;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.7rem;
}

.ad-sidebar-nav button:hover {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}
