/* ==========================================
   organigramme.css – Page Organigramme
   ECT Sécurité
========================================== */

/* --- Section Organigramme --- */
.organigramme {
    padding: 70px 20px;
    text-align: center;
}

/* --- Arbre hiérarchique --- */
.tree-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.level {
    display: flex;
    justify-content: center;
    gap: 40px;
    position: relative;
}

/* Niveau 0 : Direction Générale */
.level-0 {
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

/* Niveau 1 : Associés */
.level-1 {
    justify-content: center;
    gap: 30px;
}

/* Niveau 4 : Agents (taille réduite) */
.level-4 .node,
.level-4 .node-img {
    width: 80px;
    height: 80px;
    padding: 8px 15px;
    font-size: 0.85rem;
}

/* --- Wrapper image + nom --- */
.node-img-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Nom (affiché au hover) */
.node-name {
    display: none;
    margin-bottom: 10px;
    font-weight: bold;
    color: #c8a951;
    font-size: 1rem;
    text-align: center;
}

.node-img-wrapper:hover .node-name {
    display: block;
}

/* Cercles avec photo */
.node-img {
    width: 100px;
    height: 100px;
    border: 3px solid #c8a951;
    border-radius: 50%;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
}

.node-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.node-img:hover {
    transform: scale(1.05);
    border-color: #fff;
}

/* --- Nodes classiques --- */
.node {
    padding: 10px 20px;
    border: 2px solid #c8a951;
    border-radius: 8px;
    background: #1a1a1a;
    color: #f5f5f5;
    transition: transform 0.3s, background 0.3s, color 0.3s, box-shadow 0.3s;
    font-size: 1rem;
    text-align: center;
}

.node:hover {
    transform: scale(1.05);
    color: #c8a951;
    box-shadow: 0 4px 15px rgba(200, 169, 81, 0.5);
}

/* Connecteurs verticaux */
.level:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    width: 2px;
    height: 25px;
    background: #c8a951;
}

.level-1::after,
.level-4::after {
    display: none;
}

/* Mode clair */
.light-mode .node {
    background: #fff;
    color: #222;
}

/* Responsive */
@media (max-width: 1200px) {

    .level-4 .node,
    .level-4 .node-img {
        width: 70px;
        height: 70px;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .level {
        flex-direction: column;
        gap: 15px;
    }

    .level-4 {
        gap: 10px;
    }
}