/* Animation de connexion utilisateurs-experts améliorée */
.network-animation {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 400px;
    margin: 0 auto;
}

.network-animation .node {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 3px solid #fff;
    transition: all 0.3s ease;
    z-index: 2;
}

/* Style spécial pour le nœud central avec le logo */
.network-animation .node.central {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-size: 85%;
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: 0 0 25px rgba(0, 159, 227, 0.3);
    border: none;
    animation: pulse-glow 3s infinite alternate;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 15px rgba(0, 159, 227, 0.3);
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        box-shadow: 0 0 30px rgba(0, 159, 227, 0.6);
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.network-animation .node:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.network-animation .node.central:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.network-animation .node-label {
    position: absolute;
    background-color: var(--primary);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.network-animation .node:hover .node-label {
    opacity: 1;
    transform: translateY(0);
}

.network-animation .node.expert {
    border-color: var(--primary);
}

.network-animation .node.user {
    border-color: var(--secondary);
}

.network-animation .node.expert .node-label {
    background-color: var(--primary);
}

.network-animation .node.user .node-label {
    background-color: var(--secondary);
}

.network-animation .connection {
    position: absolute;
    border-top: 2px dashed rgba(0, 159, 227, 0.3);
    z-index: 1;
    transform-origin: 0 0;
}

.network-animation .connection.active {
    border-top: 2px dashed rgba(0, 159, 227, 0.8);
    animation: pulse 2s infinite;
}

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

/* Positionnement du nœud central */
.network-animation .node.central {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Animation de flottement pour les nœuds périphériques */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.network-animation .node:not(.central) {
    animation: float 6s ease-in-out infinite;
}

/* Décalage des animations pour chaque nœud */
.network-animation .node:nth-child(2) {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.network-animation .node:nth-child(3) {
    top: 15%;
    right: 15%;
    animation-delay: 1s;
}

.network-animation .node:nth-child(4) {
    bottom: 15%;
    left: 15%;
    animation-delay: 2s;
}

.network-animation .node:nth-child(5) {
    bottom: 10%;
    right: 20%;
    animation-delay: 1.5s;
}

.network-animation .node:nth-child(6) {
    top: 40%;
    right: 5%;
    animation-delay: 0.5s;
}

.network-animation .node:nth-child(7) {
    bottom: 40%;
    left: 5%;
    animation-delay: 2.5s;
}

@media (max-width: 768px) {
    .network-animation {
        height: 300px;
    }
    
    .network-animation .node {
        width: 50px;
        height: 50px;
    }
    
    .network-animation .node.central {
        width: 70px;
        height: 70px;
    }
}

/* Animation des connexions */
@keyframes drawConnection {
    0% {
        width: 0;
        opacity: 0;
    }
    100% {
        width: 100%;
        opacity: 1;
    }
}

.network-animation .connection {
    animation: drawConnection 1.5s forwards, pulse 2s infinite 1.5s;
    width: 0;
}

/* Animation des connexions avec délais différents */
.network-animation .connection:nth-child(8) {
    animation-delay: 0.2s;
}

.network-animation .connection:nth-child(9) {
    animation-delay: 0.4s;
}

.network-animation .connection:nth-child(10) {
    animation-delay: 0.6s;
}

.network-animation .connection:nth-child(11) {
    animation-delay: 0.8s;
}

.network-animation .connection:nth-child(12) {
    animation-delay: 1s;
}

.network-animation .connection:nth-child(13) {
    animation-delay: 1.2s;
}

/* Animation des nœuds */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.network-animation .node:not(.central) {
    animation: fadeIn 0.8s forwards, float 6s ease-in-out infinite;
    opacity: 0;
}

.network-animation .node.central {
    animation: fadeIn 0.8s forwards, pulse-glow 3s infinite alternate;
    opacity: 0;
}

.network-animation .node:nth-child(1) {
    animation-delay: 0s, 0s;
}

.network-animation .node:nth-child(2) {
    animation-delay: 0.2s, 0s;
}

.network-animation .node:nth-child(3) {
    animation-delay: 0.3s, 1s;
}

.network-animation .node:nth-child(4) {
    animation-delay: 0.4s, 2s;
}

.network-animation .node:nth-child(5) {
    animation-delay: 0.5s, 1.5s;
}

.network-animation .node:nth-child(6) {
    animation-delay: 0.6s, 0.5s;
}

.network-animation .node:nth-child(7) {
    animation-delay: 0.7s, 2.5s;
}

/* Textes explicatifs */
.network-text {
    text-align: center;
    margin-bottom: 2rem;
}

.network-text h2 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.network-text p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* Section complète */
.network-section {
    padding: 5rem 0;
    background-color: var(--off-white);
    position: relative;
    overflow: hidden;
}

.network-section:before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background-color: rgba(0, 159, 227, 0.05);
    top: -150px;
    left: -150px;
    z-index: 0;
}

.network-section:after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: rgba(255, 122, 0, 0.05);
    bottom: -100px;
    right: -100px;
    z-index: 0;
}

.network-section .container {
    position: relative;
    z-index: 1;
}

/* Adaptation pour mobile */
@media (max-width: 576px) {
    .network-animation {
        height: 250px;
    }
    
    .network-animation .node {
        width: 40px;
        height: 40px;
    }
    
    .network-animation .node.central {
        width: 60px;
        height: 60px;
    }
    
    .network-animation .node-label {
        font-size: 0.7rem;
        padding: 3px 8px;
    }
}
