/*
Theme Name: Social Network Pro
Description: Un thème WordPress complet pour créer un réseau social avec les meilleures fonctionnalités de Facebook et Twitter
Version: 1.0
Author: Votre Nom
Text Domain: social-network-pro
*/

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1877f2;
    --primary-hover: #166fe5;
    --secondary-color: #42b883;
    --accent-color: #f39c12;
    --danger-color: #e41e3f;
    --success-color: #42b883;
    --warning-color: #f39c12;
    --info-color: #3498db;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f0f2f5;
    --bg-tertiary: #e4e6ea;
    --bg-hover: #f8f9fa;
    
    --text-primary: #1c1e21;
    --text-secondary: #65676b;
    --text-muted: #8a8d91;
    
    --border-color: #dadde1;
    --border-hover: #bcc0c4;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    min-height: 100vh;
}

/* Container principal */
.social-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.social-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: var(--transition);
}

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

.search-bar {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border: 2px solid transparent;
    border-radius: 25px;
    background: var(--bg-secondary);
    font-size: 14px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.search-bar input:focus {
    outline: none;
    background: var(--bg-primary);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.1);
    transform: translateY(-1px);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #65676b;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-item {
    position: relative;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    font-size: 20px;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-item.active {
    color: var(--primary-color);
    background: rgba(24, 119, 242, 0.1);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, var(--danger-color), #ff6b6b);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    animation: pulse 2s infinite;
}

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

/* Layout principal */
.main-layout {
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    gap: 24px;
    padding: 24px 0;
    min-height: calc(100vh - 80px);
}

/* Sidebar gauche */
.left-sidebar {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 100px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    font-weight: 500;
    margin-bottom: 4px;
}

.sidebar-menu a:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.sidebar-menu .icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Contenu principal */
.main-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

/* Formulaire de post */
.post-form {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.post-form:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

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

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 16px;
    object-fit: cover;
    border: 3px solid var(--border-color);
    transition: var(--transition);
}

.user-avatar:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.post-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid transparent;
    border-radius: 25px;
    background: var(--bg-secondary);
    font-size: 16px;
    resize: none;
    min-height: 50px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.post-input:focus {
    outline: none;
    background: var(--bg-primary);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.1);
    transform: translateY(-1px);
}

.post-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
    gap: 12px;
}

.post-action-btn {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: 14px;
    flex: 1;
    justify-content: center;
}

.post-action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.post-action-btn:last-child {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 700;
}

.post-action-btn:last-child:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.post-action-btn .icon {
    margin-right: 8px;
}

/* Posts */
.post {
    background: #fff;
    border: 1px solid #dadde1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

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

.post-author-info {
    flex: 1;
}

.post-author-name {
    font-weight: 600;
    color: #1c1e21;
    text-decoration: none;
}

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

.post-time {
    color: #65676b;
    font-size: 14px;
}

.post-content {
    margin-bottom: 15px;
    line-height: 1.5;
}

.post-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

.post-actions-bar {
    display: flex;
    justify-content: space-around;
    padding-top: 15px;
    border-top: 1px solid #dadde1;
}

.post-action {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #65676b;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}

.post-action:hover {
    background-color: #f0f2f5;
}

.post-action.liked {
    color: #1877f2;
}

.post-action .icon {
    margin-right: 8px;
}

/* Sidebar droite */
.right-sidebar {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.suggested-friends {
    margin-bottom: 20px;
}

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

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

.friend-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.friend-info {
    flex: 1;
}

.friend-name {
    font-weight: 600;
    color: #1c1e21;
    text-decoration: none;
}

.friend-name:hover {
    text-decoration: underline;
}

.friend-mutual {
    color: #65676b;
    font-size: 12px;
}

.follow-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: #1877f2;
    color: white;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.follow-btn:hover {
    background: #166fe5;
}

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

@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .left-sidebar,
    .right-sidebar {
        position: static;
        margin-bottom: 20px;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
    
    .search-bar {
        order: 3;
        width: 100%;
        margin: 10px 0 0 0;
    }
}

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

.post {
    animation: fadeIn 0.3s ease-out;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #18191a;
        color: #e4e6ea;
    }
    
    .social-header,
    .left-sidebar,
    .right-sidebar,
    .main-content,
    .post,
    .post-form {
        background: #242526;
        border-color: #3a3b3c;
    }
    
    .post-input {
        background: #3a3b3c;
        color: #e4e6ea;
    }
    
    .search-bar input {
        background: #3a3b3c;
        color: #e4e6ea;
    }
}
