/* =========================================================
   1. BANNIÈRE ANIMÉE (HERO)
   ========================================================= */
.team-hero {
    position: relative;
    background: linear-gradient(135deg, var(--navy, #1e3a5f) 0%, var(--night, #0a1424) 100%);
    color: #fff;
    padding-block: clamp(4rem, 8vw, 7rem);
    overflow: hidden;
}

.team-hero__container {
    width: min(1240px, 100%);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.team-hero__content {
    animation: fadeInLeft 0.8s ease-out;
}

.team-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.team-hero__badge-dot {
    width: 8px;
    height: 8px;
    background: var(--red, #c92525);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(201, 37, 37, 0.3);
}

.team-hero__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #fff;
}

.team-hero__title span {
    color: var(--red, #c92525);
    display: block;
}

.team-hero__subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.team-hero__desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    max-width: 500px;
}

.team-hero__illustration {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 0.8s ease-out 0.2s backwards;
}

.team-illustration {
    width: 100%;
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
}

/* Animations SVG */
.team-ill__bg-circle {
    fill: rgba(255, 255, 255, 0.05);
    animation: pulse 4s ease-in-out infinite;
}

.team-ill__star {
    animation: twinkle 3s ease-in-out infinite;
}
.team-ill__star--1 { animation-delay: 0s; }
.team-ill__star--2 { animation-delay: 1s; }
.team-ill__star--3 { animation-delay: 2s; }

.team-ill__scale-plate {
    transform-origin: 200px 100px;
    animation: swing 4s ease-in-out infinite;
}

.team-ill__person {
    animation: float 5s ease-in-out infinite;
}
.team-ill__person--1 { animation-delay: 0.5s; }
.team-ill__person--2 { animation-delay: 0s; }
.team-ill__person--3 { animation-delay: 1s; }

/* Particules flottantes */
.team-hero__particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}

.team-hero__particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: floatUp 10s linear infinite;
}

.team-hero__particle:nth-child(1) { left: 10%; animation-duration: 12s; animation-delay: 0s; }
.team-hero__particle:nth-child(2) { left: 25%; animation-duration: 15s; animation-delay: 2s; }
.team-hero__particle:nth-child(3) { left: 40%; animation-duration: 10s; animation-delay: 4s; }
.team-hero__particle:nth-child(4) { left: 60%; animation-duration: 14s; animation-delay: 1s; }
.team-hero__particle:nth-child(5) { left: 75%; animation-duration: 11s; animation-delay: 3s; }
.team-hero__particle:nth-child(6) { left: 90%; animation-duration: 13s; animation-delay: 5s; }

/* Keyframes Hero */
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.05; }
    50% { transform: scale(1.1); opacity: 0.1; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes swing {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes floatUp {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

/* =========================================================
   2. SECTION ÉQUIPE (Grille & Cartes)
   ========================================================= */
.team-section {
    padding-block: clamp(3rem, 6vw, 5rem);
    background: var(--bg-secondary, #f3f5f8);
}

[data-theme="dark"] .team-section {
    background: var(--night, #0a1424);
}

.team-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3.5rem;
    padding-inline: 1rem;
}

.team-header__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--text-primary, #111827);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.team-header__title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--red, #c92525);
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

.team-header__text {
    font-size: 1.1rem;
    color: var(--text-secondary, #526071);
    line-height: 1.7;
}

/* Grille */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: min(1240px, 100%);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
}

/* Carte Membre */
.team-card {
    background: var(--surface, #ffffff);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color, #e2e6ec);
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.team-card:nth-child(1) { animation-delay: 0.1s; }
.team-card:nth-child(2) { animation-delay: 0.2s; }
.team-card:nth-child(3) { animation-delay: 0.3s; }
.team-card:nth-child(4) { animation-delay: 0.4s; }
.team-card:nth-child(5) { animation-delay: 0.5s; }
.team-card:nth-child(6) { animation-delay: 0.6s; }

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(10, 20, 36, 0.12);
    border-color: rgba(201, 37, 37, 0.3);
}

.team-card__media {
    width: 100%;
    height: 320px;
    position: relative;
    background: linear-gradient(135deg, var(--navy, #1e3a5f), #2c4a70);
    overflow: hidden;
}

.team-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.team-card:hover .team-card__img {
    transform: scale(1.05);
}

.team-card__fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
}

.team-card__fallback svg {
    width: 80px;
    height: 80px;
}

.team-card__content {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.team-card__name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary, #111827);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.team-card__role {
    color: var(--red, #c92525);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 1.25rem;
}

.team-card__bio {
    color: var(--text-secondary, #526071);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
}

.team-card__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color, #e2e6ec);
}

.team-spec-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(30, 58, 95, 0.08);
    color: var(--navy, #1e3a5f);
    transition: background 0.2s, color 0.2s;
}

[data-theme="dark"] .team-spec-badge {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

.team-card:hover .team-spec-badge {
    background: rgba(201, 37, 37, 0.1);
    color: var(--red, #c92525);
}

.team-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary, #526071);
    background: var(--surface, #ffffff);
    border-radius: 16px;
    border: 2px dashed var(--border-color, #e2e6ec);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   3. RESPONSIVE MOBILE
   ========================================================= */
@media (max-width: 900px) {
    .team-hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .team-hero__desc {
        margin-inline: auto;
    }
    .team-hero__illustration {
        order: -1;
        margin-bottom: 2rem;
    }
    .team-illustration {
        max-width: 300px;
    }
}

@media (max-width: 640px) {
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .team-card__media {
        height: 280px;
    }
    .team-card__content {
        padding: 1.5rem;
    }
    .team-header__title {
        font-size: 1.8rem;
    }
}