/* Annuaire Styles */
:root {
    --primary-light: #5F43C7;
    --background-light: #F5F5F5;
}

.annuaire-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.annuaire-header {
    background: #fff;
    border: 2px solid #E4E0F6;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin-bottom: 40px;
}

.annuaire-header h1 {
    color: var(--e-global-color-primary);
    font-size: 2.5rem;
    margin: 0;
    font-weight: 700;
}

.annuaire-header h2 {
    color: var(--primary-light);
    font-size: 1.5rem;
    margin: 10px 0 0;
    font-weight: 600;
}

/* Layout */
.annuaire-body {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* Sidebar */
.annuaire-sidebar {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
    border-radius: 12px;
    background: var(--background-light);
}

.annuaire-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.annuaire-sidebar li {
    /* margin-bottom: 15px; */
    margin: 5px;
}

.dept-link {
    display: block;
    padding: 15px 20px;
    background: #fff;
    color: var(--primary-light);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    border: 1px solid transparent;
}

.dept-link.active {
    background: var(--primary-light);
    color: var(--e-global-color-accent);
}

/* Main Content */
.annuaire-main {
    flex-grow: 1;
    min-width: 0; /* Prevent flex overflow */
}

.dept-section {
    margin-bottom: 80px;
    scroll-margin-top: 40px;
}

.cpts-wrapper {
    background: var(--background-light);
    border-radius: 12px;
    padding: 40px;
    padding-top: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.cpts-wrapper.collapsed {
    padding-bottom: 20px;
}

.cpts-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    cursor: pointer;
}

.cpts-wrapper.collapsed .cpts-header-row {
    margin-bottom: 0;
}

.cpts-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.3s ease;
}

.cpts-wrapper.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.cpts-title {
    color: var(--primary-light);
    font-size: 2rem;
    margin: 0;
    font-weight: 400;
}

/* Contacts Grid */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    max-height: 2000px; /* Arbitrary large height */
    opacity: 1;
}

.cpts-wrapper.collapsed .contacts-grid {
    max-height: 0;
    opacity: 0;
    margin: 0;
    gap: 0;
}

.contact-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.contact-info {
    margin-bottom: 25px;
}

.contact-name {
    color: var(--e-global-color-primary);
    font-weight: 700;
    margin-bottom: 10px;
}

/* .contact-details {
} */

.contact-btn {
    color: var(--e-global-color-primary);
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 8px 8px 16px;
    border: 2px solid var(--e-global-color-primary);
    border-radius: 50px;
    text-align: center;

    width: fit-content;
}

.contact-btn:after {
    content: url(/wp-content/uploads/2025/07/fcpts-chevron-right.svg);
    background-color: var(--e-global-color-a0dca4f);
    /* padding: 10px 13px 8px 14px; */
    padding: 8px 14px;
    border-radius: 50px;
    margin-left: 5px;
}

.contact-btn:hover {
    background: #5e35b1;
    color: #fff;
}



/* Responsive */
@media (max-width: 900px) {
    .annuaire-body {
        flex-direction: column;
    }

    .annuaire-sidebar {
        width: 100%;
        position: static;
        margin-bottom: 30px;
    }

    .annuaire-main {
        width: 100%;
    }

    .contacts-grid {
        grid-template-columns: 1fr;
    }

}
