/* Styles pour la page Feed */

.feed-page {
    margin-left: 320px;
    margin-right: 320px;
    padding: 2rem;
    padding-top: calc(80px + 2rem);
    padding-bottom: 2rem;
    max-width: 1680px;
    flex: 1;
}

.feed-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
}

.feed-empty {
    padding: 3rem;
    text-align: center;
    color: #fff;
    font-family: 'URW Form', sans-serif;
    font-size: 1.125rem;
}

/* Styles pour les posts */
.feed-post {
    padding: 1rem;
    border-radius: 16px;
    position: relative;
    max-width: 100%;
    width: 100%;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.post-author-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.post-author-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.post-author-name {
    font-family: 'Brevia', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.post-author-name-link {
    color: inherit;
    text-decoration: none;
}

.post-author-name-link:hover {
    text-decoration: underline;
}

.post-time {
    font-family: 'URW Form', sans-serif;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.post-content {
    margin-bottom: 0.75rem;
}

.post-text {
    font-family: 'URW Form', sans-serif;
    font-size: 0.9rem;
    color: #fff;
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
    white-space: pre-wrap;
}

.post-media {
    margin-top: 0.75rem;
}

.post-media-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: block;
}

.post-media-audio {
    width: 100%;
    margin-top: 0.5rem;
}

.post-media-video {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: block;
}

/* Actions du post */
.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.post-actions-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.post-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'URW Form', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem 0.75rem;
    border-radius: 90px;
}

.post-action-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.post-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.post-action-btn.active {
    color: #A855F7;
}

.post-action-btn.active .action-icon {
    fill: #A855F7;
}

/* Pour l'icône repost, ne pas appliquer le fill pour éviter la déformation */
.repost-btn.active .action-icon {
    fill: none;
    stroke: #A855F7;
    stroke-width: 2;
}

/* Mode Violet pour les réactions actives */
body.mode-violet .post-action-btn.active,
html.mode-violet .post-action-btn.active {
    color: #A855F7;
}

body.mode-violet .post-action-btn.active .action-icon,
html.mode-violet .post-action-btn.active .action-icon {
    fill: #A855F7;
}

body.mode-violet .repost-btn.active .action-icon,
html.mode-violet .repost-btn.active .action-icon {
    fill: none;
    stroke: #A855F7;
    stroke-width: 2;
}

/* Mode Orange pour les réactions actives */
body.mode-orange .post-action-btn.active,
html.mode-orange .post-action-btn.active {
    color: #FF6B35;
}

body.mode-orange .post-action-btn.active .action-icon,
html.mode-orange .post-action-btn.active .action-icon {
    fill: #FF6B35;
}

body.mode-orange .repost-btn.active .action-icon,
html.mode-orange .repost-btn.active .action-icon {
    fill: none;
    stroke: #FF6B35;
    stroke-width: 2;
}

.action-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.action-count {
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

/* Bouton favoris aligné à droite */
.favorite-btn .action-icon {
    width: 24px;
    height: 24px;
}

.favorite-btn .action-icon {
    width: 22px;
    height: 22px;
}

.favorite-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.favorite-btn.active {
    color: #FFD700;
}

.favorite-btn.active .action-icon {
    fill: #FFD700;
}

/* Zone de commentaires */
.post-comments {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1rem;
    position: relative;
    z-index: 10;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.comment-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-family: 'URW Form', sans-serif;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 60px;
}

.comment-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.comment-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.comment-submit-btn {
    align-self: flex-end;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 90px;
    color: #fff;
    font-family: 'URW Form', sans-serif;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-submit-btn:hover {
    background: linear-gradient(135deg, #7C3AED 0%, #9333EA 100%);
}

/* Mode Orange pour comment-submit-btn */
body.mode-orange .comment-submit-btn {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%) !important;
}

body.mode-orange .comment-submit-btn:hover {
    background: linear-gradient(135deg, #E55A2B 0%, #E6821A 100%) !important;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    position: relative;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.comment-author {
    font-family: 'Brevia', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
}

.comment-author-link {
    color: inherit;
    text-decoration: none;
}

.comment-author-link:hover {
    text-decoration: underline;
}

.comment-time {
    font-family: 'URW Form', sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.comment-text {
    font-family: 'URW Form', sans-serif;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin: 0 0 0.5rem 0;
    white-space: pre-wrap;
}

.comment-like-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'URW Form', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem 0.75rem;
    border-radius: 90px;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0;
    min-height: 44px;
}

.comment-like-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.comment-like-btn.active {
    color: #A855F7;
}

.comment-like-btn.active .comment-like-icon {
    fill: #A855F7;
}

/* Mode Violet pour les likes de commentaires actifs */
body.mode-violet .comment-like-btn.active,
html.mode-violet .comment-like-btn.active {
    color: #A855F7;
}

body.mode-violet .comment-like-btn.active .comment-like-icon,
html.mode-violet .comment-like-btn.active .comment-like-icon {
    fill: #A855F7;
}

/* Mode Orange pour les likes de commentaires actifs */
body.mode-orange .comment-like-btn.active,
html.mode-orange .comment-like-btn.active {
    color: #FF6B35;
}

body.mode-orange .comment-like-btn.active .comment-like-icon,
html.mode-orange .comment-like-btn.active .comment-like-icon {
    fill: #FF6B35;
}

.comment-like-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.comment-like-btn span.comment-like-count {
    font-weight: 600;
    min-width: 16px;
    text-align: center;
}

.comment-like-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 991.98px) {
    .feed-page {
        margin-left: 0;
        margin-right: 0;
        padding: 1.5rem;
        padding-top: calc(80px + 1.5rem);
        padding-bottom: calc(80px + 1.5rem);
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .feed-page {
        padding: 1rem;
        padding-top: calc(80px + 1rem);
        padding-bottom: calc(80px + 1rem);
    }

    .feed-post {
        padding: 1rem;
    }

    .post-actions {
        gap: 1rem;
    }

    .action-icon {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 480px) {
    .feed-page {
        padding: 0.5rem;
    }

    .post-author-avatar {
        width: 40px;
        height: 40px;
    }

    .post-author-name {
        font-size: 0.9rem;
    }

    .post-text {
        font-size: 0.9rem;
    }
    
    .post-media-image,
    .post-media-video {
        max-height: 300px;
    }
}

