.containere {
    max-width: 850px;
    margin: auto;
}
h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}
.post {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 25px;
    overflow: hidden;
    transition: transform 0.2s ease;
}
.post:hover {
    transform: scale(1.01);
}
.post-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.post-header img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    margin-right: 15px;
}
.post-header h3 {
    margin: 0;
    font-size: 18px;
    color: #222;
}
.post-date {
    font-size: 13px;
    color: #777;
    margin-top: 4px;
}
.category-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-top: 5px;
}
.category-academic { background-color: #4e73df; }
.category-event { background-color: #1cc88a; }
.category-alert { background-color: #e74a3b; }
.category-general { background-color: #858796; }
.category-deadline { background-color: #f6c23e; }

.post-content {
    padding: 20px;
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}
.post-content em {
    color: #555;
    display: block;
    margin-bottom: 10px;
}

.post img, .post video {
    width: 100%;
    display: block;
    max-height: 400px;
    object-fit: cover;
}

.post a.file-link {
    display: inline-block;
    margin: 10px 0 0 20px;
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}
.post a.file-link:hover {
    text-decoration: underline;
}

/* Gallery Slider Styles */
.gallery-slider {
    position: relative;
    margin: 15px 0;
    padding: 0 20px;
}
.gallery-main {
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
}
.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.gallery-main img.active {
    opacity: 1;
}
.gallery-thumbnails {
    display: flex;
    gap: 5px;
    margin-top: 10px;
    overflow-x: auto;
    padding: 10px 0;
}
.gallery-thumbnails .thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
}
.gallery-thumbnails .thumbnail.active {
    opacity: 1;
    border: 2px solid #4361ee;
}
.gallery-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}
.gallery-prev, .gallery-next {
    background: #4361ee;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s;
}
.gallery-prev:hover, .gallery-next:hover {
    background: #3f37c9;
}
.gallery-counter {
    font-weight: bold;
    color: #333;
    min-width: 50px;
    text-align: center;
}

/* Actions et Interactions */
.actions {
    border-top: 1px solid #f0f0f0;
    padding: 12px 20px;
    display: flex;
    justify-content: space-around;
    background: #fafafa;
}
.like-btn, .comment-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    transition: color 0.2s ease;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
}
.like-btn:hover, .comment-btn:hover {
    background: #f8f9fa;
    color: #007bff;
}
.like-btn.liked {
    color: #e74a3b;
}
.like-btn.liked i {
    color: #e74a3b;
}

/* Section Commentaires */
.comments-section {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 20px;
    display: none;
}
.comments-section.active {
    display: block;
}
.comment-form {
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #4361ee;
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.1);
}
.form-group textarea {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}
.submit-btn {
    background: #4361ee;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 14px;
    font-weight: 600;
}
.submit-btn:hover {
    background: #3f37c9;
}
.comments-list {
    max-height: 500px;
    overflow-y: auto;
}
.comment {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.comment.reply {
    margin-left: 30px;
    background: #f8f9fa;
    border-left: 3px solid #4361ee;
}
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.comment-author {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}
.comment-date {
    font-size: 12px;
    color: #777;
}
.comment-text {
    color: #555;
    line-height: 1.5;
    font-size: 14px;
    margin-bottom: 10px;
}
.comment-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}
.comment-like-btn, .reply-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}
.comment-like-btn:hover, .reply-btn:hover {
    background: #e9ecef;
    color: #333;
}
.comment-like-btn.liked {
    color: #e74a3b;
}
.comment-like-btn.liked i {
    color: #e74a3b;
}
.reply-form {
    margin-top: 15px;
    padding: 15px;
    background: #f1f3f4;
    border-radius: 6px;
    display: none;
}
.reply-form.active {
    display: block;
}
.no-comments {
    text-align: center;
    color: #777;
    font-style: italic;
    padding: 20px;
    background: white;
    border-radius: 8px;
}
.replies-section {
    margin-top: 15px;
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
}
.reply-indicator {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}