/* ========================================
   CORRECTIONS POUR COPIE CONFORME X.COM
======================================== */

/* Masquer le header de WoWonder */
.header-container {
    display: none !important;
}

/* Supprimer marges et paddings du body */
body {
    margin: 0 !important;
    padding: 0 !important;
    background-color: var(--x-bg-primary) !important;
    overflow-x: hidden !important;
}

/* Container principal */
.content-container {
    margin: 0 !important;
    padding: 0 !important;
}

#contnet {
    margin: 0 !important;
    padding: 0 !important;
}

/* Page margin adjustments */
.page-margin {
    margin: 0 auto !important;
    max-width: 1280px !important;
    padding: 0 !important;
}

/* Corrections pour le composer - enlever les lignes */
.x-composer {
    border-bottom: 1px solid var(--x-border) !important;
    padding: 16px !important;
    background: transparent !important;
}

.x-composer hr,
.x-composer br,
.x-composer-divider {
    display: block !important;
    height: 1px !important;
    background-color: var(--x-border) !important;
    border: none !important;
    margin: 12px 0 !important;
}

/* Fix textarea du composer */
.x-composer-textarea {
    min-height: 52px !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

/* Corrections des posts - afficher les avatars et noms */
.x-post-avatar,
.x-post-avatar img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.x-post-name,
.x-post-username,
.x-post-time {
    display: inline !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force correct styling for post header elements - ULTRA SPECIFIC */
.x-post .x-post-content .x-post-header .x-post-user-info a.x-post-name,
.x-post .x-post-content .x-post-header .x-post-user-info > a.x-post-name:link,
.x-post .x-post-content .x-post-header .x-post-user-info > a.x-post-name:visited,
.x-post .x-post-content .x-post-header .x-post-user-info > a.x-post-name:hover,
.x-post .x-post-content .x-post-header .x-post-user-info > a.x-post-name:active,
.x-post .x-post-content .x-post-header .x-post-user-info > a.x-post-name:focus,
div.x-post div.x-post-inner div.x-post-content div.x-post-header div.x-post-user-info a.x-post-name {
    color: #e7e9ea !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    line-height: 20px !important;
    text-decoration: none !important;
}

.x-post .x-post-content .x-post-header .x-post-user-info a.x-post-username,
.x-post .x-post-content .x-post-header .x-post-user-info > a.x-post-username:link,
.x-post .x-post-content .x-post-header .x-post-user-info > a.x-post-username:visited,
.x-post .x-post-content .x-post-header .x-post-user-info > a.x-post-username:hover,
.x-post .x-post-content .x-post-header .x-post-user-info > a.x-post-username:active,
.x-post .x-post-content .x-post-header .x-post-user-info > a.x-post-username:focus,
div.x-post div.x-post-inner div.x-post-content div.x-post-header div.x-post-user-info a.x-post-username {
    color: #71767b !important;
    font-weight: 400 !important;
    font-size: 15px !important;
    line-height: 20px !important;
    text-decoration: none !important;
}

span.x-post-time,
.x-post span.x-post-time,
.x-post-user-info span.x-post-time {
    color: #71767b !important;
    font-weight: 400 !important;
    font-size: 15px !important;
    line-height: 20px !important;
}

span.x-post-dot,
.x-post span.x-post-dot,
.x-post-user-info span.x-post-dot {
    color: #71767b !important;
    font-weight: 400 !important;
    font-size: 15px !important;
}

/* Supprimer footer */
footer {
    display: none !important;
}

/* Chat - le garder mais le styliser */
.extra {
    position: fixed;
    bottom: 0;
    right: 20px;
    z-index: 9999;
}

/* Fix pour les rows et cols */
.row {
    margin: 0 !important;
    min-height: 100vh !important;
}

.leftcol,
.middlecol,
.rightcol {
    padding: 0 !important;
}

/* Sidebar gauche - style X.com exact */
.leftcol {
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid var(--x-border);
}

/* Feed central - largeur exacte */
.middlecol,
.col-md-7.middlecol {
    border-right: 1px solid var(--x-border);
    min-height: 100vh;
    width: 598px !important;
    max-width: 598px !important;
    flex: 0 0 598px !important;
}

/* Sidebar droite */
.rightcol {
    width: 350px !important;
    min-width: 350px !important;
    padding: 0 16px !important;
    display: block !important;
}

/* Barre de recherche style X.com */
.x-search-box {
    background-color: rgb(32, 35, 39);
    border-radius: 9999px;
    padding: 12px 16px;
    margin: 4px 0 16px 0;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 0 !important;
    position: relative !important;
}

.x-search-box .x-search-icon {
    width: 19px !important;
    height: 19px !important;
    fill: rgb(113, 118, 123) !important;
    margin-right: 8px !important;
    margin-left: 10px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    flex-shrink: 0 !important;
    display: block !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
}

.x-search-box input {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--x-text-primary) !important;
    font-size: 15px !important;
    line-height: 20px !important;
    width: 100% !important;
    flex: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
}

.x-search-box input::placeholder {
    color: var(--x-text-secondary);
}

.x-search-box:focus-within {
    background-color: rgb(0, 0, 0);
    border: 1px solid var(--x-blue);
}

/* Tendances box */
.x-trends-box {
    background-color: rgb(22, 24, 28);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
}

.x-trends-header {
    padding: 12px 16px;
    font-size: 20px;
    font-weight: 800;
    color: var(--x-text-primary);
    border-bottom: 1px solid var(--x-border);
}

.x-trend-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--x-border);
    cursor: pointer;
    transition: background-color 0.2s;
}

.x-trend-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

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

.x-trend-category {
    color: var(--x-text-secondary);
    font-size: 13px;
}

.x-trend-name {
    color: var(--x-text-primary);
    font-size: 15px;
    font-weight: 700;
    margin: 2px 0;
}

.x-trend-count {
    color: var(--x-text-secondary);
    font-size: 13px;
}

/* Suggestions box */
.x-suggestions-box {
    background-color: rgb(22, 24, 28);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
}

.x-suggestions-header {
    padding: 12px 16px;
    font-size: 20px;
    font-weight: 800;
    color: var(--x-text-primary);
}

.x-suggestion-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s;
}

.x-suggestion-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.x-suggestion-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.x-suggestion-avatar {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
}

.x-suggestion-info {
    flex: 1;
}

.x-suggestion-name {
    color: var(--x-text-primary);
    font-size: 15px;
    font-weight: 700;
    display: block;
}

.x-suggestion-username {
    color: var(--x-text-secondary);
    font-size: 15px;
}

.x-suggestion-follow-btn {
    background-color: var(--x-white);
    color: var(--x-bg-primary);
    border: none;
    border-radius: 9999px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.x-suggestion-follow-btn:hover {
    background-color: rgb(215, 219, 220);
}

/* Fix bootstrap col widths pour layout exact X.com */
@media (min-width: 992px) {
    .col-md-2 {
        width: 275px !important;
        flex: 0 0 275px !important;
        max-width: 275px !important;
    }
    
    .col-md-7 {
        width: 598px !important;
        flex: 0 0 598px !important;
        max-width: 598px !important;
    }
    
    .col-md-3 {
        width: 350px !important;
        flex: 0 0 350px !important;
        max-width: 350px !important;
    }
}

/* GMod viewport (928px) - Modal system for right sidebar */
@media (min-width: 751px) and (max-width: 991px) {
    /* Cacher complètement la sidebar droite */
    .col-md-3, .rightcol {
        display: none !important;
    }

    /* Élargir la colonne centrale */
    .col-md-7, .middlecol {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 !important;
        min-height: 100vh !important;
        border-right: 1px solid var(--x-border) !important;
    }
}

/* Loader pour les posts */
.ball-pulse {
    display: flex;
    gap: 4px;
    justify-content: center;
    padding: 20px;
}

.ball-pulse div {
    width: 10px;
    height: 10px;
    background-color: var(--x-blue);
    border-radius: 100%;
    animation: pulse 0.7s infinite ease-in-out;
}

.ball-pulse div:nth-child(2) {
    animation-delay: 0.1s;
}

.ball-pulse div:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes pulse {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Masquer les éléments inutiles de WoWonder */
.navbar,
.navbar-default,
.navbar-fixed-top,
#main-header {
    display: none !important;
}


/* ========================================
   WIDGETS ET RECHERCHE - STYLE X.COM EXACT
======================================== */

/* Override recherche */
.x-search-input-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 16px !important;
}

.x-search-icon {
    color: var(--x-text-secondary) !important;
    flex-shrink: 0 !important;
}

.x-search-input {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    color: var(--x-text-primary) !important;
    font-size: 15px !important;
    width: 100% !important;
    font-family: inherit !important;
}

.x-search-box:focus-within .x-search-icon {
    color: var(--x-blue) !important;
}

/* Widgets style X.com */
.x-widget {
    background-color: rgb(22, 24, 28) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    margin-bottom: 16px !important;
}

.x-widget-header {
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--x-border) !important;
}

.x-widget-title {
    font-size: 20px !important;
    font-weight: 800 !important;
    color: var(--x-text-primary) !important;
    margin: 0 !important;
}

.x-widget-item {
    padding: 12px 16px !important;
    cursor: pointer !important;
    transition: background-color 0.2s !important;
}

.x-widget-item:hover {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

.x-trend-category {
    color: var(--x-text-secondary) !important;
    font-size: 13px !important;
    line-height: 16px !important;
}

.x-trend-name {
    color: var(--x-text-primary) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    margin: 2px 0 !important;
    line-height: 20px !important;
}

.x-trend-posts {
    color: var(--x-text-secondary) !important;
    font-size: 13px !important;
    line-height: 16px !important;
}

/* Bouton suivre dans suggestions */
.x-widget-item button {
    transition: background-color 0.2s !important;
}

.x-widget-item button:hover {
    background-color: rgb(215, 219, 220) !important;
}

