/* =========================================================================
   Page Notre Équipe
=========================================================================== */
/* ===== Intro pleine largeur ===== */
.page-template-notre-equipe .organigramme-intro {
    background: var(--bg-soft-gradient);
    border-left: 4px solid var(--color-primary-brown);
    border-radius: 8px;
    box-shadow: var(--soft-box-shadow);
    padding: 1.5rem 2rem;
}

/* ===== LIGNES DE SERVICES ===== */
/* Chaque ligne de 2 cartes = container alignfull sauf l'intro */
.page-template-notre-equipe .wp-block-uagb-container.alignfull:not(:has(.organigramme-intro))>.uagb-container-inner-blocks-wrap {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    align-items: stretch;
}

/* ===== CARTE = 1 SERVICE ===== */
.page-template-notre-equipe .organigramme-section {
    border-radius: 8px;
    padding: 0;
    box-shadow: var(--soft-box-shadow);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    max-width: none !important;
    height: 100%;
}

/* ===== CONTENU INTERNE DE LA CARTE ===== */
.page-template-notre-equipe .organigramme-section>.uagb-container-inner-blocks-wrap {
    display: block;
    padding: 1.5rem;
    margin: 0;
    height: auto;
}

/* ===== TITRES ===== */
.page-template-notre-equipe .organigramme-section h2 {
    margin: 0;
    padding: 0.8rem 0 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--color-primary-brown);
    color: var(--color-white);
    font-size: 1.2rem;
    font-weight: 500;
    border-radius: 8px 8px 0 0;
}

/* ===== ICÔNES FA6 ===== */
.page-template-notre-equipe .organigramme-section h2::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.2rem;
    line-height: 1;
}

.page-template-notre-equipe .service-direction h2::before {
    content: "\f0c0";
}

.page-template-notre-equipe .service-gestion h2::before {
    content: "\f46d";
}

.page-template-notre-equipe .service-formations h2::before {
    content: "\f0b1";
}

.page-template-notre-equipe .service-vie-scolaire h2::before {
    content: "\f2c1";
}

.page-template-notre-equipe .service-enseignement h2::before {
    content: "\f51c";
}

.page-template-notre-equipe .service-documentation h2::before {
    content: "\f02d";
}

.page-template-notre-equipe .service-sante h2::before {
    content: "\f4be";
}

.page-template-notre-equipe .service-com h2::before {
    content: "\f086";
}

.page-template-notre-equipe .service-accueil h2::before {
    content: "\f562";
}

.page-template-notre-equipe .service-restauration h2::before {
    content: "\e4da";
}

/* ===== LISTES ===== */
.page-template-notre-equipe .organigramme-section .wp-block-uagb-icon-list {
    margin: 0;
    padding: 1.5rem;
}

.page-template-notre-equipe .organigramme-section .wp-block-uagb-icon-list-child {
    margin-bottom: 1rem;
}

.page-template-notre-equipe .uagb-icon-list__label {
    font-size: 1rem;
}

/* ===== Sous-items ===== */
.page-template-notre-equipe .wp-block-uagb-icon-list .wp-block-uagb-icon-list {
    margin-top: 8px;
    margin-left: 1.5rem;
}

.page-template-notre-equipe .wp-block-uagb-icon-list .wp-block-uagb-icon-list .wp-block-uagb-icon-list-child {
    padding: 8px 0;
    font-size: 0.9rem;
}

.page-template-notre-equipe .organigramme-subitem {
    padding-left: 1.35rem;
    font-size: 0.9rem;
}

.page-template-notre-equipe .wp-block-uagb-icon-list-child.organigramme-subitem {
    border-bottom: none;
}

/* =========================================================================
   ACCORDÉON MOBILE - Notre Équipe
=========================================================================== */
@media (max-width: 768px) {

    /* Passage en colonne unique sur mobile */
    .page-template-notre-equipe .wp-block-uagb-container.alignfull:not(:has(.organigramme-intro))>.uagb-container-inner-blocks-wrap {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Titre cliquable avec indicateur + */
    .page-template-notre-equipe .organigramme-section h2 {
        cursor: pointer;
        position: relative;
        padding-right: 3rem;
        user-select: none;
        border-radius: 8px;
        transition: border-radius 0.3s ease;
    }

    /* Quand ouvert, seulement coins du haut arrondis */
    .page-template-notre-equipe .organigramme-section.is-open h2 {
        border-radius: 8px 8px 0 0;
    }

    /* Icône + / × à droite du titre */
    .page-template-notre-equipe .organigramme-section h2::after {
        content: "+";
        position: absolute;
        right: 1.25rem;
        top: 50%;
        transform: translateY(-50%);
        font-family: Arial, sans-serif;
        font-size: 1.8rem;
        font-weight: 300;
        line-height: 1;
        transition: transform 0.3s ease;
    }

    /* Contenu masqué par défaut */
    .page-template-notre-equipe .organigramme-section .wp-block-uagb-icon-list {
        display: none;
    }

    /* État ouvert */
    .page-template-notre-equipe .organigramme-section.is-open .wp-block-uagb-icon-list {
        display: block;
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Transformation du + en × quand ouvert */
    .page-template-notre-equipe .organigramme-section.is-open h2::after {
        content: "×";
        transform: translateY(-50%) rotate(90deg);
        transition: transform 0.3s ease;
    }
}

@media (max-width: 480px) {
    .page-template-notre-equipe .organigramme-section h2 {
        font-size: 1.1rem;
        padding: 0.875rem 1rem;
        padding-right: 2.75rem;
    }

    .page-template-notre-equipe .organigramme-section h2::after {
        right: 1rem;
        font-size: 1.6rem;
    }
}

/* ===== Photo d'équipe ===== */
.page-template-notre-equipe .wp-block-image.size-large {
    max-width: 1200px;
    margin: 2rem 10px;
    padding: 10px;
    border-radius: 8px;
    box-shadow: var(--soft-box-shadow);
}

/* Image / picture */
.page-template-notre-equipe .wp-block-image.size-large img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .page-template-notre-equipe .wp-block-image.size-large {
        max-width: 100%;
        margin: 1.25rem 0;
        padding: 6px;
    }
}