/* Variables de couleurs LinkedIn authentiques */
:root {
    --primary-color: #0a66c2;
    --primary-hover: #004182;
    --secondary-color: #70b5f9;
    --text-primary: #000000e6;
    --text-secondary: #666666;
    --text-tertiary: #8f5849;
    --background-color: #f3f2ef;
    --card-background: #fff;
    --border-color: #e0dfdc;
    --border-light: #f3f2ef;
    --success-color: #057642;
    --warning-color: #e7a33e;
}

/* Reset et styles de base avec police LinkedIn */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.4;
    font-size: 14px;
    font-weight: 400;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-size: 14px;
}

/* Barre de navigation LinkedIn authentique */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 52px;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Conteneur interne pour aligner la navbar avec le contenu de la page */
.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo {
    color: var(--primary-color);
    font-size: 32px;
    margin-right: 12px;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: #eef3f8;
    padding: 8px 16px;
    border-radius: 2px;
    color: var(--text-secondary);
    min-width: 280px;
}

.search-box input {
    border: none;
    background: transparent;
    margin-left: 8px;
    width: 200px;
    outline: none;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    padding: 8px 16px;
    font-size: 12px;
    transition: color 0.2s;
}

.nav-item:hover {
    color: #000;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-item.profile img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* Contenu principal */
main {
    width: 100%;
    margin: 60px auto 20px;
    padding: 0 16px;
}

/* Conteneur principal avec CSS Grid - 3 colonnes */
.container {
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 24px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}

/* Sidebar gauche */
.sidebar-left {
    position: sticky;
    top: 72px;
    height: fit-content;
    grid-column: 1;
    overflow: hidden;
    z-index: 10;
    background-color: var(--background-color);
    isolation: isolate;
}

/* Sidebar droite */
.sidebar-right {
    position: sticky;
    top: 72px;
    height: fit-content;
    grid-column: 3;
    overflow: hidden;
    z-index: 10;
    background-color: var(--background-color);
    isolation: isolate;
}

/* Main content */
.main-content {
    grid-column: 2;
    min-width: 0;
}

/* Sidebar LinkedIn authentique */
.sidebar-section {
    background: var(--card-background);
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

.sidebar-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    padding: 16px 16px 0;
    line-height: 1.2;
}

.sidebar-section p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
    padding: 0 16px 16px;
}

/* Sidebars - styles spécifiques */
.sidebar-left .sidebar-section,
.sidebar-right .sidebar-section {
    padding: 0;
    overflow: hidden;
}

.sidebar-left h3,
.sidebar-right h3 {
    padding: 15px 15px 12px;
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.sidebar-left p,
.sidebar-right p {
    padding: 0 15px 15px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Main content - styles supplémentaires */
.main-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    contain: layout;
}

/* En-tête du profil */
.profile-header {
    background-color: var(--card-background);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.cover-photo {
    height: 120px;
    position: relative;
    overflow: hidden;
}

.cover-photo .cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cover-photo:hover .cover-image {
    transform: scale(1.02);
}

.cover-photo::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    pointer-events: none;
}

.profile-info {
    position: relative;
    padding: 0 16px 12px;
    text-align: center;
    margin-top: -25px;
}

.profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #fff;
    margin: 0 auto 8px;
    overflow: hidden;
    background-color: #fff;
}

.profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* En-tête d'entreprise LinkedIn authentique */
.company-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    justify-content: center;
}

.company-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.verified-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 500;
}

.verified-badge i {
    font-size: 14px;
}

.company-metrics {
    display: flex;
    gap: 24px;
    margin: 12px 0;
    justify-content: center;
}

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

.metric-number {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.metric-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.profile-details h1 {
    font-size: 24px;
    margin-bottom: 4px;
}

.profile-details p {
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-size: 13px;
}

.location, .followers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
}

.profile-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* Boutons */
.btn {
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 13px;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn:hover::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(10, 102, 194, 0.3);
}

.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(10, 102, 194, 0.05);
    border-color: var(--primary-hover);
    color: var(--primary-hover);
}

/* Section À propos */
.about-section, .posts-section {
    background-color: var(--card-background);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.about-section h2, .posts-section h2 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.company-details {
    margin-top: 16px;
}

.detail {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.detail i {
    margin-right: 8px;
    width: 20px;
    text-align: center;
}

/* Publications LinkedIn authentiques */
.post {
    background-color: var(--card-background);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    transition: box-shadow 0.2s ease;
}

.post:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

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

.post-header img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    flex-shrink: 0;
}

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

.post-info h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.post-info p {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.post-content {
    padding: 0 12px 8px;
    flex-grow: 1;
}

.post-content h4 {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.4;
}

.post-content p {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.4;
}

.post-content ul {
    margin: 8px 0;
    padding-left: 20px;
}

.post-content li {
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.4;
}

.post-image {
    margin: 8px 0;
    border-radius: 6px;
    overflow: hidden;
    width: 100%;
}

.post-image img, .post-content img {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
}

/* Statistiques de posts LinkedIn authentiques */
.post-stats {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.reactions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.reaction-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.reaction-icons {
    display: flex;
    gap: 4px;
}

.reaction-icons i {
    font-size: 16px;
    padding: 2px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reaction-icons i:nth-child(1) { background: #0a66c2; }
.reaction-icons i:nth-child(2) { background: #e74c3c; }
.reaction-icons i:nth-child(3) { background: #f39c12; }
.reaction-icons i:nth-child(4) { background: #9b59b6; }

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

.post-actions {
    display: flex;
    justify-content: space-around;
    padding: 6px 0;
    margin-top: auto;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.post-actions button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    flex: 1;
    justify-content: center;
}

.post-actions button:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #000;
}

.post-actions button i {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Empêcher tout débordement des boutons vers la sidebar */
.post-actions {
    contain: none;
    clip-path: none;
    width: 100%;
}

.post-actions button {
    contain: layout;
    max-width: 100%;
    white-space: nowrap;
}

.post-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* Bouton style LinkedIn pour suivre dans la section équipe */
.connect-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 16px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.connect-btn:hover {
    background: rgba(10, 102, 194, 0.08);
    border-color: var(--primary-hover);
    color: var(--primary-hover);
}

/* État pending (si attribut ou classe ajoutée) */
.connect-btn[disabled], .connect-btn.is-pending {
    background: #e0dfdc;
    color: #000;
    border-color: #e0dfdc;
    cursor: default;
}

/* Amélioration du hover pour le petit bouton primary */
.connect-btn-small:hover {
    background: var(--primary-hover);
}

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

/* Commentaires */
.post-comments {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.comment {
    display: flex;
    margin-bottom: 12px;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.comment:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.comment-avatar {
    flex-shrink: 0;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    margin-right: 10px !important;
    border: 2px solid #fff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.comment-content {
    flex: 1;
}

.comment-content strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    line-height: 1.2;
}

.comment-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

.comment-content a {
    color: var(--primary-color);
    font-weight: 600;
}

.comment-reply {
    margin-top: 8px;
    padding-left: 20px;
    border-left: 2px solid #e0dfdc;
}

.comment-reply .comment {
    margin-bottom: 8px;
    padding: 6px 10px;
    background-color: #f8f9fa;
}

/* Équipe */
.team-member {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #f0f0f0;
}

.team-member:last-child {
    border-bottom: none;
}

.team-member:hover {
    background-color: #f8f9fa;
}

.team-member img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin-right: 12px;
    flex-shrink: 0;
}

.team-member > div {
    flex-grow: 1;
}

.team-member h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    color: var(--text-primary);
}

.team-member p {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Suggestions de connexion LinkedIn */
.suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    gap: 12px;
}

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

.suggestion-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.suggestion-info {
    flex: 1;
    min-width: 0;
}

.suggestion-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.suggestion-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.mutual-connections {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.connect-btn-small {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

/* Net Anime Actualités */
.news-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.news-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.news-header i {
    color: var(--text-secondary);
    font-size: 14px;
}

.news-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.news-list {
    margin-bottom: 12px;
}

.news-item {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.news-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.news-item p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

.see-more-link {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
}

.see-more-link:hover {
    color: var(--primary-color);
}

.see-more-link i {
    font-size: 10px;
}

/* Jeux du jour */
.games-list {
    margin-top: 12px;
}

.game-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.game-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 4px;
}

.game-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.game-icon.sudoku {
    background: #22c55e;
    color: white;
    line-height: 1;
}

.game-icon.zip {
    background: #f97316;
    color: white;
    font-size: 16px;
}

.game-icon.tango {
    background: #eab308;
    color: white;
    font-size: 16px;
}

.game-icon.queens {
    background: #8b5cf6;
    color: white;
    font-size: 16px;
}

.game-info {
    flex: 1;
    min-width: 0;
}

.game-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.game-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.3;
}

.game-item i {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Section Conseil */
.tip-section {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
}

.tip-badge {
    background: #fef3c7;
    color: #92400e;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.tip-section p {
    font-size: 14px;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.connect-btn:hover {
    background-color: rgba(10, 102, 194, 0.2);
}

.connect-btn::before {
    content: '';
    margin-right: 4px;
    font-weight: bold;
}

/* Pages liées */
.related-page {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.related-page:hover {
    background-color: #f5f5f5;
}

.related-page img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    margin-right: 12px;
    flex-shrink: 0;
}

.related-page h4 {
    font-size: 14px;
    margin: 0 0 2px 0;
    color: #0a66c2;
}

.related-page p {
    font-size: 12px;
    color: #666;
    margin: 0;
}

/* Responsive */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 250px 1fr 250px;
        gap: 16px;
    }
}

@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .sidebar-left {
        display: none;
    }
    
    .sidebar-right {
        display: none;
    }
    
    .main-content {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .container {
        gap: 16px;
    }
    
    .nav-container {
        padding: 0 8px;
    }
    
    .search-box input {
        width: 120px;
    }
    
    .nav-item span {
        display: none;
    }
}