:root {
    --primary-orange: #FF6B35;
    --secondary-orange: #FF8E53;
    --primary-yellow: #FFD166;
    --secondary-yellow: #FFED99;
    --primary-pink: #FF6B9D;
    --secondary-pink: #FF9AC6;
    --dark-bg: #1A1A2E;
    --darker-bg: #16213E;
    --card-bg: rgba(30, 30, 46, 0.9);
    --text-primary: #FFFFFF;
    --text-secondary: #B0B3B8;
    --border-color: #3A3B3C;
    --success-color: #4CAF50;
    --error-color: #F44336;
    --warning-color: #FF9800;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@media (max-width: 768px) {

    .nav-left,
    .nav-right {
        position: static;
        display: flex;
        width: 100%;
    }

    .mobile-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(26, 26, 46, 0.98);
        padding: 15px;
        display: none;
        flex-direction: column;
        gap: 10px;
        z-index: 999;
    }

    .mobile-menu.active {
        display: flex;
    }
}


@media (max-width: 768px) {

    .nav-left,
    .nav-right {
        max-height: calc(100vh - 60px);
        overflow-y: auto;
    }

}


.nav-brand {
    position: relative;
    display: flex;
    align-items: center;
    height: 60px; /* hauteur FIXE de la navbar */
    gap: 10px;
    text-decoration: none;
}

/* Logo GRAND */
.nav-logo {
    width: 55px;
    height: 55px;
    object-fit: contain;
    flex-shrink: 0;        /* empêche la compression */
}

/* Texte Nyapi STABLE */
.brand-text {
    font-size: 20px;
    line-height: 1;       /* CRUCIAL */
    display: flex;
    align-items: center;
}



body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
 background: linear-gradient(
        135deg,
        var(--primary-orange),
        var(--primary-pink),
        var(--primary-pink),
        var(--primary-yellow)
    );
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.navbar {
    background-color: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-brand {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-yellow);
    text-decoration: none;
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-yellow);
}

.search-form {
    display: flex;
    align-items: center;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    width: 200px;
    transition: width 0.3s ease;
}

.search-input:focus {
    width: 250px;
    outline: none;
    border-color: var(--primary-orange);
}

.search-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    margin-left: -40px;
}

.main-content {
    margin-top: 20px;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

.posts-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-header {
    padding: 20px;
    background-color: var(--card-bg);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.post-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.post-profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-yellow);
}

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

.post-author {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.post-author:hover {
    color: var(--primary-yellow);
}

.post-time {
    color: var(--text-secondary);
    font-size: 12px;
}

.post-title {
    margin-bottom: 10px;
}

.post-title a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 20px;
}

.post-title a:hover {
    color: var(--primary-yellow);
}

.post-content {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

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

.post-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    object-fit: cover;
}

.post-video {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
}

.post-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.like-section {
    display: flex;
    gap: 10px;
}

.like-btn, .dislike-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.like-btn:hover, .dislike-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.like-btn.liked {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    color: white;
}

.dislike-btn.disliked {
    background: linear-gradient(45deg, #6B35FF, #9D6BFF);
    color: white;
}

.comment-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-link:hover {
    color: var(--primary-yellow);
}

/*.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(10px);
}*/

/*.sidebar-card h3 {
    margin-bottom: 15px;
    color: var(--primary-yellow);
}*/

.active-users {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.active-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    text-decoration: none;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.active-user:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-orange);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.tag:hover {
    transform: scale(1.05);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.page-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.page-link:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.2);
}

.current-page {
    padding: 8px 16px;
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    border-radius: 6px;
    font-weight: bold;
}

.ellipsis {
    color: var(--text-secondary);
}

.auth-container {
    min-height: calc(100vh - 160px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    backdrop-filter: blur(10px);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-yellow);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: var(--text-secondary);
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 16px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-orange);
}

.auth-btn {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    color: white;
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.auth-btn:hover {
    transform: translateY(-2px);
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: var(--primary-yellow);
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.alert {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.alert-error {
    background-color: rgba(244, 67, 54, 0.2);
    color: #F44336;
    border: 1px solid #F44336;
}

.create-post-container {
    max-width: 800px;
    margin: 0 auto;
}

.create-post-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.post-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
}

.submit-btn {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s ease;
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

small {
    color: var(--text-secondary);
    font-size: 12px;
}

.profile-container {
    max-width: 1000px;
    margin: 0 auto;
}

.profile-header {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    display: flex;
    gap: 30px;
    align-items: center;
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
}

.profile-avatar {
    position: relative;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-yellow);
}

.edit-profile-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
}

.profile-info h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.profile-bio {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.profile-stats {
    display: flex;
    gap: 30px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-yellow);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.profile-posts {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.profile-posts h2 {
    margin-bottom: 20px;
    color: var(--primary-yellow);
}

.user-post-card {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.user-post-card:last-child {
    border-bottom: none;
}

.post-excerpt {
    color: var(--text-secondary);
    margin: 10px 0;
}

.post-meta {
    display: flex;
    gap: 15px;
    color: var(--text-secondary);
    font-size: 14px;
}

.no-posts {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px;
}

.edit-profile-container {
    max-width: 600px;
    margin: 0 auto;
}

.edit-profile-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.save-btn {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.save-btn:hover {
    transform: translateY(-2px);
}

.messages-container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.messages-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.messages-header h2 {
    color: var(--primary-yellow);
}

.messages-list {
    max-height: 600px;
    overflow-y: auto;
}

.message-thread {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-primary);
    transition: background-color 0.3s ease;
}

.message-thread:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.thread-avatar {
    position: relative;
}

.thread-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-orange);
}

.unread-badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
}

.thread-info {
    flex: 1;
}

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

.thread-user {
    font-weight: 600;
}

.thread-time {
    color: var(--text-secondary);
    font-size: 12px;
}

.thread-preview {
    color: var(--text-secondary);
    font-size: 14px;
}

.no-messages {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.chat-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    height: calc(100vh - 200px);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-to-messages {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-to-messages:hover {
    color: var(--primary-yellow);
}

.chat-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-yellow);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
}

.message.sent {
    align-self: flex-end;
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    color: white;
    border-bottom-right-radius: 4px;
}

.message.received {
    align-self: flex-start;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    text-align: right;
}

.chat-form {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.message-input-container {
    display: flex;
    gap: 10px;
}

.message-input-container textarea {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    resize: none;
    height: 44px;
    max-height: 100px;
}

.message-input-container textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
}

.send-btn {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.send-btn:hover {
    transform: scale(1.1);
}

.search-container {
    max-width: 1000px;
    margin: 0 auto;
}

.search-header {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.search-results {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

.users-results, .posts-results {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.users-results h3, .posts-results h3 {
    color: var(--primary-yellow);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    text-decoration: none;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.search-user:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.search-post {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.search-post:last-child {
    border-bottom: none;
}

.search-post .post-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.search-post .post-title a:hover {
    color: var(--primary-yellow);
}

.post-excerpt {
    color: var(--text-secondary);
    margin: 8px 0;
}

.post-author {
    color: var(--primary-yellow);
}

.no-results {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
}

.footer {
    background-color: rgba(26, 26, 46, 0.95);
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    padding: 20px 0;
}

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

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.comments-section {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
}

.comment-form {
    margin-bottom: 20px;
}

.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    resize: vertical;
    min-height: 80px;
    margin-bottom: 10px;
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
}

.comment-submit {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment {
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.comment-profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-orange);
}

.comment-author {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.comment-author:hover {
    color: var(--primary-yellow);
}

.comment-time {
    color: var(--text-secondary);
    font-size: 12px;
}

.comment-content {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    gap: 10px;
}

.reply-btn, .delete-comment-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.reply-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.delete-comment-btn {
    color: var(--error-color);
}

.delete-comment-btn:hover {
    background-color: rgba(244, 67, 54, 0.1);
}

.reply-form {
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.reply-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    resize: vertical;
    min-height: 60px;
    margin-bottom: 8px;
}

.reply-submit, .cancel-reply {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    border: none;
}

.reply-submit {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    color: white;
}

.cancel-reply {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.replies {
    margin-left: 30px;
    margin-top: 15px;
    border-left: 2px solid var(--border-color);
    padding-left: 15px;
}

.reply .comment {
    background-color: transparent;
    padding: 10px 0;
}

.delete-btn {
    background: linear-gradient(45deg, #FF3535, #FF6B6B);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.delete-btn:hover {
    transform: translateY(-2px);
}

.post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.post-detail {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.post-detail .post-title {
    font-size: 28px;
    margin: 20px 0;
}

.post-detail .post-content {
    font-size: 16px;
    line-height: 1.8;
    margin: 20px 0;
}

.post-detail-container {
    max-width: 800px;
    margin: 0 auto;
}
/* Styles pour les nouveaux boutons de message */
.send-message-btn {
    position: absolute;
    bottom: 0;
    right: 0;
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.message-link {
    color: var(--primary-yellow);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.message-link:hover {
    color: var(--primary-orange);
}

.message-author-btn {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.author-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-author-full {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

/* Styles pour la page Find Users */
.find-users-container {
    background-color: var(--card-bg);
    border-radius: 10px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.find-users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.find-users-header h2 {
    color: var(--primary-yellow);
}

.user-search-form {
    display: flex;
    gap: 10px;
}

.user-search-form input {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    width: 250px;
}

.user-search-form input:focus {
    outline: none;
    border-color: var(--primary-orange);
}

.users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.user-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.user-card-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-yellow);
}

.user-card-info {
    flex: 1;
}

.user-card-name {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    display: block;
    margin-bottom: 5px;
}

.user-card-name:hover {
    color: var(--primary-yellow);
}

.user-card-joined {
    color: var(--text-secondary);
    font-size: 12px;
}

.user-card-bio {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 15px;
    font-size: 14px;
}

.user-card-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 13px;
}

.user-card-actions {
    display: flex;
    gap: 10px;
}

.view-profile-btn, .message-user-btn {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.view-profile-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.view-profile-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.message-user-btn {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.message-user-btn:hover {
    transform: translateY(-2px);
    color: white;
}

.no-users {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* Styles pour la page Messages */
.messages-actions {
    display: flex;
    gap: 10px;
}

.new-message-btn {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s ease;
}

.new-message-btn:hover {
    transform: translateY(-2px);
    color: white;
}

.start-conversation-btn {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 20px;
    transition: transform 0.3s ease;
}

.start-conversation-btn:hover {
    transform: translateY(-2px);
    color: white;
}
/* Notifications */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 15px 20px;
    background: var(--card-bg);
    border-left: 4px solid var(--primary-orange);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 300px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left-color: var(--success-color);
}

.notification-error {
    border-left-color: var(--error-color);
}

.notification-warning {
    border-left-color: var(--warning-color);
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Image preview */
.image-preview {
    position: relative;
    margin-top: 10px;
    max-width: 200px;
}

.image-preview img {
    width: 100%;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.remove-preview {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--error-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-preview:hover {
    background: #d32f2f;
}

/* Loading spinner */
.fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* Messages unread indicator */
.unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Like/dislike animations */
.like-btn.liked i,
.dislike-btn.disliked i {
    animation: pop 0.3s ease;
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Chat improvements */
.chat-messages {
    scroll-behavior: smooth;
}

.message {
    animation: slideIn 0.3s ease;
}

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

/* Search dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-results-dropdown.show {
    display: block;
}

.search-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

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

.search-result-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.search-result-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-result-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.search-result-post {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.search-result-post-title {
    font-weight: 600;
    color: var(--text-primary);
}

.search-result-post-content {
    color: var(--text-secondary);
    font-size: 13px;
}

.search-form {
    position: relative;
}
/* Animation pour les likes */
.animated {
    animation: pop 0.3s ease;
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Dropdown de recherche */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    border-top: 1px solid var(--border-color);
}

.search-results-dropdown.show {
    display: block;
}

.search-results-section {
    padding: 10px 0;
}

.search-results-title {
    padding: 8px 15px;
    color: var(--primary-yellow);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-result-item {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

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

.search-result-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.search-result-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-result-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-orange);
}

.search-result-username {
    font-weight: 600;
    font-size: 14px;
}

.search-result-bio {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 2px;
}

.search-result-post {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-result-post-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.search-result-post-content {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.4;
}

.search-result-post-author {
    color: var(--primary-yellow);
    font-size: 11px;
    font-style: italic;
}

/* Animation pour les nouveaux messages */
.message {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.message.show {
    opacity: 1;
    transform: translateY(0);
}

/* Bouton de soumission en chargement */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fa-spin {
    animation: spin 1s linear infinite;
}

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

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--secondary-orange), var(--secondary-pink));
}
/* Messages temporaires */
.temp-message {
    opacity: 0.7;
}

.temp-message .message-content {
    position: relative;
}

.temp-message .message-content::after {
    content: 'Sending...';
    position: absolute;
    top: 0;
    right: 0;
    font-size: 10px;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 10px;
    transform: translateY(-100%);
}

/* Animation pour les nouveaux messages */
.message {
    animation: slideIn 0.3s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Amélioration du scroll du chat */
.chat-messages {
    scroll-behavior: smooth;
    padding: 20px;
    min-height: 300px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Style pour le placeholder de chargement */
.chat-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

.chat-loading .fa-spinner {
    margin-right: 10px;
}
/* Avatar par défaut */
.default-avatar {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border-radius: 50%;
}

.nav-profile-pic, .post-profile-pic, .profile-pic, .comment-profile-pic {
    object-fit: cover;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
}

/* Indicateur d'envoi de message */
.sending-indicator {
    display: inline-block;
    animation: blink 1s infinite;
    color: var(--primary-yellow);
    margin-left: 5px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Message temporaire */
.temp-message {
    opacity: 0.8;
}

.temp-message .message-content {
    border-right: 2px solid var(--primary-yellow);
    padding-right: 5px;
}
/* Indicateur de messages non lus */
.unread-indicator {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
    animation: pulse 2s infinite;
}

/* Animation de pulsation */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 5px rgba(255, 107, 53, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0);
    }
}

/* Version mini pour la navbar */
.nav-link .unread-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    font-size: 10px;
}

/* Indicateur sur les threads de message */
.thread-avatar .unread-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    animation: pulse 2s infinite;
}

/* Position relative pour les avatars */
.thread-avatar {
    position: relative;
    display: inline-block;
}
/* Indicateur messages non lus */
.unread-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(45deg, #FF6B35, #FF6B9D);
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    padding: 0 4px;
    animation: pulse 2s infinite;
    z-index: 1000;
    border: 2px solid var(--dark-bg);
}

/* Position relative pour le lien messages */
.nav-link[href*="messages"] {
    position: relative;
}

/* Animation de pulsation */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 4px rgba(255, 107, 53, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0);
    }
}

/* Pour les écrans mobiles */
@media (max-width: 768px) {
    .unread-indicator {
        top: 5px;
        right: 5px;
        min-width: 16px;
        height: 16px;
        font-size: 9px;
    }
}
/* Badge messages non lus */
.unread-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(45deg, #FF6B35, #FF6B9D);
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    padding: 0 4px;
    animation: pulse 2s infinite;
    border: 2px solid #1A1A2E;
    z-index: 1000;
}

.nav-link[href*="messages"] {
    position: relative;
}

/* Animation pulse */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Notifications */
.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: rgba(30, 30, 46, 0.95);
    border-left: 4px solid #FF6B35;
    border-radius: 6px;
    padding: 15px 20px;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 300px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    border-left-color: #4CAF50;
}

.notification-error {
    border-left-color: #F44336;
}

.notification-close {
    background: none;
    border: none;
    color: #B0B3B8;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}
/* Badge sur les avatars de thread */
.thread-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    border: 2px solid var(--card-bg);
    animation: pulse 1.5s infinite;
}

.thread-avatar {
    position: relative;
    display: inline-block;
}

/* Compteur de messages non lus dans le preview */
.unread-count {
    background: linear-gradient(45deg, var(--primary-orange), var(--primary-pink));
    color: white;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
    vertical-align: middle;
}

/* Style pour les threads avec messages non lus */
.message-thread.unread {
    background: rgba(255, 107, 53, 0.1);
    border-left: 3px solid var(--primary-orange);
}

.message-thread.unread:hover {
    background: rgba(255, 107, 53, 0.15);
}

/* Badge sur la navbar (garder l'existant) */
.unread-badge-nav {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(45deg, #FF6B35, #FF6B9D);
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    padding: 0 4px;
    animation: pulse 2s infinite;
    z-index: 1000;
    border: 2px solid var(--dark-bg);
}

/* Animation de pulse améliorée */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(255, 107, 53, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0);
    }
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 22px;
    cursor: pointer;
}
@media (max-width: 768px) {

    .nav-container {
        padding: 0 12px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-left,
    .nav-right {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: rgba(26, 26, 46, 0.98);
        flex-direction: column;
        gap: 10px;
        padding: 15px;
        display: none;
        z-index: 999;
    }

    .nav-left.active,
    .nav-right.active {
        display: flex;
    }

    .nav-link {
        width: 100%;
        justify-content: center;
        font-size: 16px;
    }

    .search-form {
        width: 100%;
    }

    .search-input {
        width: 100%;
    }
}
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }
}
.profile-username {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    line-height: 1.2; /* 🔧 IMPORTANT */
}

.admin-badge {
    background: linear-gradient(135deg, #ff4d4d, #ff8800);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;

    position: relative;
    top: 2px; /* 🔥 AJUSTEMENT FIN */
}

.admin-badge i {
    font-size: 0.65rem;
}
/* Styles pour les prévisualisations ZIP et Scratch */
.zip-preview, .scratch-preview {
    background: #2c2233;
    border-radius: 8px;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border-left: 4px solid #ff6b35;
}

.zip-preview-content, .scratch-preview-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
}

.zip-preview-content i, .scratch-preview-content i {
    color: #ff6b35;
    font-size: 1.25rem;
}

.download-preview-btn, .view-scratch-btn {
    margin-left: auto;
    background: #4a3c5a;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.3s;
}

.download-preview-btn:hover, .view-scratch-btn:hover {
    background: #5a4c6a;
}
