/* Styles du feed social */
.feed-container {
    min-height: 100vh;
    background: #F9F6F1;
}

.feed-header {
    background: white;
    border-bottom: 1px solid #E8D5B7;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    color: #8B9A6B;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-nav {
    display: flex;
    gap: 5px;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 15px;
    color: #6B6B6B;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    position: relative;
}

.nav-link:hover {
    background: #F0F0F0;
    color: #8B9A6B;
}

.nav-link.active {
    color: #8B9A6B;
}

.nav-link i {
    font-size: 1.2rem;
    margin-bottom: 3px;
}

.nav-link span {
    font-size: 0.75rem;
}

.badge {
    position: absolute;
    top: 5px;
    right: 10px;
    background: #dc3545;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
    min-width: 18px;
    text-align: center;
}

.feed-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.feed-layout {
    display: grid;
    grid-template-columns: 300px 1fr 350px;
    gap: 20px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Sidebar gauche */
.quick-profile {
    text-align: center;
}

.profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid #E8D5B7;
}

.profile-pic-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.quick-profile h3 {
    color: #3A3A3A;
    margin: 10px 0 5px;
}

.quick-profile .username {
    color: #6B6B6B;
    font-size: 0.9rem;
}

.quick-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #E8D5B7;
}

.quick-stats .stat {
    text-align: center;
}

.quick-stats .value {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: #8B9A6B;
}

.quick-stats .label {
    font-size: 0.8rem;
    color: #6B6B6B;
}

.suggestions h4 {
    color: #3A3A3A;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #F0F0F0;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
}

.suggestion-info {
    flex: 1;
}

.suggestion-info .name {
    font-weight: 500;
    color: #3A3A3A;
    font-size: 0.9rem;
}

.suggestion-info .username {
    color: #6B6B6B;
    font-size: 0.8rem;
}

.follow-btn {
    padding: 5px 12px;
    background: #8B9A6B;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.85rem;
}

/* Feed central */
.create-post {
    margin-bottom: 20px;
}

.post-input-container {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

#post-input {
    flex: 1;
    border: 1px solid #E8D5B7;
    border-radius: 20px;
    padding: 12px 20px;
    resize: none;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
}

#post-input:focus {
    outline: none;
    border-color: #8B9A6B;
    min-height: 80px;
}

.post-media-preview {
    margin: 15px 0;
    position: relative;
}

.post-media-preview img,
.post-media-preview video {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
}

.remove-media {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #F0F0F0;
}

.media-buttons {
    display: flex;
    gap: 10px;
}

.media-btn {
    background: none;
    border: none;
    color: #6B6B6B;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s;
}

.media-btn:hover {
    background: #F0F0F0;
    color: #8B9A6B;
}

#post-visibility {
    padding: 8px 15px;
    border: 1px solid #E8D5B7;
    border-radius: 8px;
    background: white;
    color: #3A3A3A;
}

/* Posts */
.post {
    background: white;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.post-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
}

.post-author {
    display: flex;
    align-items: center;
    flex: 1;
    text-decoration: none;
}

.post-author img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 12px;
}

.post-author-info .name {
    font-weight: 500;
    color: #3A3A3A;
}

.post-author-info .time {
    font-size: 0.85rem;
    color: #6B6B6B;
}

.post-more {
    background: none;
    border: none;
    color: #6B6B6B;
    cursor: pointer;
    font-size: 1.2rem;
}

.post-content {
    padding: 0 20px 15px;
}

.post-text {
    color: #3A3A3A;
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-media {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    cursor: pointer;
}

.post-footer {
    display: flex;
    justify-content: space-around;
    padding: 15px 20px;
    border-top: 1px solid #F0F0F0;
}

.post-action {
    background: none;
    border: none;
    color: #6B6B6B;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 8px;
    transition: all 0.3s;
}

.post-action:hover {
    background: #F0F0F0;
}

.post-action.liked {
    color: #dc3545;
}

.post-action i {
    font-size: 1.1rem;
}

/* Sidebar droite */
.recent-trophies h4,
.top-streaks h4 {
    color: #3A3A3A;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.trophy-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #F0F0F0;
}

.trophy-item:last-child {
    border-bottom: none;
}

.trophy-icon {
    font-size: 1.5rem;
    margin-right: 12px;
}

.trophy-info .user {
    font-weight: 500;
    color: #3A3A3A;
    font-size: 0.9rem;
}

.trophy-info .name {
    color: #6B6B6B;
    font-size: 0.8rem;
}

.streak-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
}

.streak-rank {
    font-weight: bold;
    color: #8B9A6B;
    margin-right: 12px;
    font-size: 1.2rem;
}

.streak-user {
    display: flex;
    align-items: center;
    flex: 1;
}

.streak-user img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 10px;
}

.streak-info .name {
    font-weight: 500;
    color: #3A3A3A;
    font-size: 0.9rem;
}

.streak-info .days {
    color: #6B6B6B;
    font-size: 0.8rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #E8D5B7;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6B6B6B;
}

/* Messages */
.messages-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: 600px;
}

.conversations-list {
    border-right: 1px solid #E8D5B7;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid #F0F0F0;
}

.conversation-item:hover {
    background: #F9F6F1;
}

.conversation-item.active {
    background: #E8D5B7;
}

.chat-window {
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 1px solid #E8D5B7;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.message {
    display: flex;
    margin-bottom: 15px;
}

.message.sent {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    background: #F0F0F0;
}

.message.sent .message-bubble {
    background: #8B9A6B;
    color: white;
}

.chat-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid #E8D5B7;
}

.chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #E8D5B7;
    border-radius: 25px;
    margin-right: 10px;
}

.chat-input button {
    background: #8B9A6B;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

/* Loader */
.loader {
    text-align: center;
    padding: 40px;
    color: #6B6B6B;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E8D5B7;
    border-top-color: #8B9A6B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

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

/* Responsive */
@media (max-width: 1200px) {
    .feed-layout {
        grid-template-columns: 250px 1fr 300px;
    }
}

@media (max-width: 992px) {
    .feed-layout {
        grid-template-columns: 1fr;
    }

    .sidebar-left,
    .sidebar-right {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-nav {
        gap: 0;
    }

    .nav-link {
        padding: 8px 10px;
    }

    .nav-link span:not(.badge) {
        display: none;
    }

    .messages-container {
        grid-template-columns: 1fr;
    }

    .conversations-list {
        display: none;
    }
}