/* ==========================================================================
   TEAM & ORGANIGRAMME - EPIM AFRIQUE
   Design calqué sur la présentation de l'équipe d'EPIM Afrique (À Propos)
   ========================================================================== */

/* Hero Section */
.team-hero {
    background: linear-gradient(135deg, #0a2844 0%, #0f3b63 100%);
    padding: 4.5rem 0 3.5rem;
    position: relative;
    overflow: hidden;
    min-height: 32vh;
    display: flex;
    align-items: center;
    border-bottom: 3px solid var(--gold, #d4af37);
}

.team-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.team-hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    margin: 0 auto;
}

.team-hero-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #e2c158;
    background: rgba(212, 175, 55, 0.16);
    padding: 0.35rem 0.95rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.team-hero h1 {
    font-size: 2.85rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.team-hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

/* Section Principale Équipe */
.team-main-section {
    background: #ffffff;
    padding: 5rem 0 6rem;
}

/* En-tête de Section avec Soulignement Artistique (comme sur epimafrique.com) */
.team-heading-wrapper {
    max-width: 760px;
    margin: 0 auto 4.5rem;
}

.team-section-heading {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color, #0f3b63);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
}

.team-heading-accent {
    position: relative;
    display: inline-block;
    color: #19588d;
}

.team-heading-curl {
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 16px;
    color: var(--gold, #d4af37);
    pointer-events: none;
}

.team-heading-desc {
    font-size: 1.05rem;
    color: #556577;
    line-height: 1.6;
    margin: 1.2rem auto 0;
    max-width: 680px;
}

/* Paliers de la hiérarchie */
.team-tier {
    margin-bottom: 4rem;
}

.pole-card.pole-formation {
    border-top-color: #7d213b;
}

.pole-formation .team-member {
    border-left-color: #7d213b;
}

.team-tier--lead {
    margin-bottom: 4.5rem;
}

.team-tier--direction {
    margin-bottom: 4.5rem;
}

.team-tier--roster {
    margin-bottom: 5.5rem;
}

/* Cartes individuelles de personnes (style épuré sans boîte rigide) */
.team-person-card {
    text-align: center;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.team-person-card--lead {
    max-width: 440px;
    margin: 0 auto;
}

/* Avatar circulaire */
.team-avatar-wrap {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1.35rem;
    position: relative;
    background: #eef3f8;
    box-shadow: 0 8px 24px rgba(15, 59, 99, 0.12);
    border: 4px solid #ffffff;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.team-avatar-wrap--lead {
    width: 165px;
    height: 165px;
    box-shadow: 0 12px 32px rgba(15, 59, 99, 0.16);
    border: 5px solid #ffffff;
}

.team-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.team-person-card:hover .team-avatar-wrap {
    transform: scale(1.06);
    box-shadow: 0 14px 34px rgba(15, 59, 99, 0.18);
    border-color: rgba(212, 175, 55, 0.6);
}

.team-person-card:hover .team-avatar-img {
    transform: scale(1.05);
}

/* Nom */
.team-person-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color, #0f3b63);
    margin: 0 0 0.35rem;
    letter-spacing: -0.01em;
    transition: color 0.25s ease;
}

.team-person-card--lead .team-person-name {
    font-size: 1.45rem;
    font-weight: 800;
}

.team-person-card:hover .team-person-name {
    color: #19588d;
}

/* Rôle / Fonction */
.team-person-role {
    font-size: 0.94rem;
    color: #556577;
    line-height: 1.48;
    margin: 0 auto 0.45rem;
    max-width: 290px;
    font-weight: 400;
}

.team-person-card--lead .team-person-role {
    font-size: 1.05rem;
    color: #405264;
    font-weight: 500;
}

/* Email de contact direct */
.team-person-email {
    margin-top: 0.25rem;
}

.team-email-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.88rem;
    color: var(--primary-color, #0f3b63);
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.team-email-link i {
    color: var(--gold, #d4af37);
    font-size: 0.92rem;
    transition: color 0.2s ease;
}

.team-email-link:hover {
    color: #936f00;
    background: rgba(212, 175, 55, 0.1);
}

.team-email-link:hover i {
    color: #936f00;
}

/* Grilles */
.team-row--3cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.75rem 2rem;
    max-width: 980px;
    margin: 0 auto;
    justify-content: center;
}

.team-grid--3cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3.5rem 2.25rem;
    max-width: 1140px;
    margin: 0 auto;
}

/* ==========================================================================
   SECTION CAMPUS (3 Campus pour une dynamique Continentale)
   ========================================================================== */
.campus-section {
    margin-top: 6rem;
    padding-top: 5rem;
    border-top: 1px solid rgba(15, 59, 99, 0.08);
}

.campus-header {
    max-width: 700px;
    margin: 0 auto 3.5rem;
}

.campus-kicker {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #936f00;
    background: rgba(212, 175, 55, 0.12);
    padding: 0.35rem 0.95rem;
    border-radius: 50px;
    margin-bottom: 0.85rem;
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.campus-main-title {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--primary-color, #0f3b63);
    margin-bottom: 0.65rem;
    letter-spacing: -0.01em;
}

.campus-subtitle {
    font-size: 1rem;
    color: #556577;
    margin-bottom: 0;
}

.campus-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1140px;
    margin: 0 auto;
}

.campus-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.2rem 1.8rem;
    text-align: center;
    border: 1px solid rgba(15, 59, 99, 0.09);
    box-shadow: 0 4px 18px rgba(15, 59, 99, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.campus-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(15, 59, 99, 0.12);
    border-color: rgba(212, 175, 55, 0.4);
}

.campus-flag {
    font-size: 2.8rem;
    line-height: 1;
    margin-bottom: 1rem;
}

.campus-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color, #0f3b63);
    margin-bottom: 0.35rem;
}

.campus-location {
    font-size: 0.92rem;
    color: #556577;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.campus-address {
    font-size: 0.86rem;
    color: #728194;
    margin-bottom: 1rem;
}

.campus-director {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(15, 59, 99, 0.07);
    width: 100%;
}

.campus-director-photo {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 0.65rem;
    border: 2px solid var(--gold, #d4af37);
}

.campus-director-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.campus-director-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--primary-color, #0f3b63);
    margin-bottom: 0.2rem;
}

.campus-director-title {
    font-size: 0.82rem;
    color: #657588;
}

.campus-contact {
    margin-top: 0.85rem;
}

.campus-contact a {
    display: inline-flex;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary-color, #0f3b63);
    text-decoration: none;
    transition: color 0.2s ease;
}

.campus-contact a i {
    color: var(--gold, #d4af37);
    margin-right: 0.35rem;
}

.campus-contact a:hover {
    color: #936f00;
}

/* ==========================================================================
   RESPONSIVE DESIGN (gardes en .98px)
   ========================================================================== */
@media (max-width: 991.98px) {
    .team-hero h1 {
        font-size: 2.3rem;
    }
    .team-section-heading {
        font-size: 2.1rem;
    }
    .team-row--3cols {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 1.75rem;
    }
    .team-grid--3cols {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem 1.75rem;
    }
    .campus-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .team-hero {
        padding: 3.5rem 0 2.5rem;
    }
    .team-hero h1 {
        font-size: 1.85rem;
    }
    .team-hero p {
        font-size: 0.98rem;
    }
    .team-main-section {
        padding: 3.5rem 0 4.5rem;
    }
    .team-heading-wrapper {
        margin-bottom: 3rem;
    }
    .team-section-heading {
        font-size: 1.75rem;
    }
    .team-row--3cols,
    .team-grid--3cols,
    .campus-grid {
        grid-template-columns: 1fr;
        gap: 2.25rem;
    }
    .team-avatar-wrap {
        width: 125px;
        height: 125px;
    }
    .team-avatar-wrap--lead {
        width: 145px;
        height: 145px;
    }
    .campus-section {
        margin-top: 4rem;
        padding-top: 3.5rem;
    }
    .campus-main-title {
        font-size: 1.6rem;
    }
}

@media (forced-colors: active) {
    .team-avatar-wrap,
    .campus-card {
        border: 2px solid ButtonText;
    }
}

@media print {
    .team-hero {
        background: none;
        color: #000000;
        border-bottom: 2px solid #000000;
    }
    .team-person-card {
        break-inside: avoid;
    }
}
