/*
 * Pixinside.Team — page équipe : directeur mis en avant, grille de portraits, anciens membres repliés.
 * Reprend les variables du thème (--text, --accent…) avec des valeurs de repli.
 */

/* ---------- Intitulés de groupe (contenu de l'éditeur, centrés à l'origine) ---------- */

.prose:has(.team-grid, .team-lead) h4[style*="center"] {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
    margin: 4.5rem 0 1.75rem;
    font-family: var(--font-display, Georgia, serif);
    font-size: 1.65rem !important;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    text-align: left !important;
    color: var(--text, inherit);
}
.prose:has(.team-grid, .team-lead) h4[style*="center"]::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line, rgba(0, 0, 0, .15));
}
.prose:has(.team-grid, .team-lead) > h4:first-child { margin-top: 0; }

/* ---------- Directeur ---------- */

.team-lead {
    display: grid;
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
}
.team-lead__media { display: block; }
.team-lead .team-member__photo { width: 100%; }
.prose .team-lead__name {
    margin: 0 0 1rem;
    font-family: var(--font-display, Georgia, serif);
    font-size: clamp(1.7rem, 3vw, 2.3rem);
    font-weight: 500;
    line-height: 1.15;
}
.prose .team-lead__name a { color: var(--text, inherit); }
.prose .team-lead__name a:hover { color: var(--accent-hover, inherit); }
.team-lead__name strong { font-weight: 500; }
.team-lead__name .team-member__title { display: block; margin-bottom: .6rem; font-family: var(--font-body, sans-serif); line-height: 1; }
.prose .team-lead__bio {
    max-width: 34rem;
    margin: 0 0 1.25rem;
    color: var(--text-muted, #666);
    font-size: 1rem;
    line-height: 1.7;
}
.prose .team-lead__more { color: var(--accent, inherit); font-size: .95rem; }
.team-lead__more span { display: inline-block; transition: transform .25s cubic-bezier(.2, .7, .2, 1); }
.team-lead__more:hover span { transform: translateX(4px); }

/* ---------- Grille des membres ---------- */

.team-grid,
.prose .team-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
    gap: 2.25rem 1.5rem;
}
.prose .team-member { margin: 0; }

.team-member__link,
.prose .team-member__link {
    display: block;
    color: var(--text, inherit);
    text-decoration: none;
}

.team-member__photo {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--surface, #e9e9e6);
}
.team-member__photo img,
.prose .team-member__photo img {
    display: block;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform .6s ease;
}
.team-member__link:hover .team-member__photo img,
.team-lead__media:hover .team-member__photo img { transform: scale(1.03); }

.team-member__initials {
    font-family: var(--font-display, Georgia, serif);
    font-size: 2.6rem;
    letter-spacing: .03em;
    color: var(--text-muted, #777);
}

.team-member__name {
    display: block;
    margin-top: .85rem;
    padding-top: .65rem;
    border-top: 1px solid var(--line, rgba(0, 0, 0, .15));
    font-size: .98rem;
    line-height: 1.35;
    transition: color .2s, border-color .2s;
}
.team-member__name strong { font-weight: 600; }
.team-member__link:hover .team-member__name { color: var(--accent-hover, inherit); border-top-color: var(--accent, currentColor); }

.team-member__title {
    margin-right: .35em;
    font-size: .7rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--text-muted, #777);
}

.team-member--former { grid-column: 1 / -1; }
.team-member__info { display: block; color: var(--text-muted, #777); font-size: .85rem; }

/* ---------- Anciens membres (repliés par team.js) ---------- */

.team-former { margin-top: .5rem; border-bottom: 1px solid var(--line, rgba(0, 0, 0, .15)); }
.team-former__group { border-top: 1px solid var(--line, rgba(0, 0, 0, .15)); }
.team-former__group summary {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    padding: 1.1rem 0;
    cursor: pointer;
    list-style: none;
}
.team-former__group summary::-webkit-details-marker { display: none; }
.team-former__group summary::after {
    content: "+";
    margin-left: auto;
    color: var(--accent, inherit);
    font-size: 1.4rem;
    line-height: 1;
    transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.team-former__group[open] summary::after { transform: rotate(45deg); }
.prose .team-former__label {
    margin: 0;
    font-family: var(--font-display, Georgia, serif);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text, inherit);
    transition: color .2s;
}
.team-former__group summary:hover .team-former__label { color: var(--accent-hover, inherit); }
.team-former__count { color: var(--text-muted, #777); font-size: .85rem; font-variant-numeric: tabular-nums; }

.prose .team-former__list {
    list-style: none;
    margin: 0 0 1.75rem;
    padding: 0;
    columns: 2 16rem;
    column-gap: 2.5rem;
}
.prose .team-former__list li {
    margin: 0;
    padding: .4rem 0;
    break-inside: avoid;
    font-size: .93rem;
    line-height: 1.45;
}
.team-former__list li span { display: block; color: var(--text-muted, #777); font-size: .82rem; }

/* ---------- Petits écrans ---------- */

@media (max-width: 575px) {
    .team-lead { grid-template-columns: 1fr; }
    .team-lead__media { max-width: 14rem; }
    .team-grid,
    .prose .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1rem; }
    .prose:has(.team-grid, .team-lead) h4[style*="center"] { font-size: 1.4rem !important; margin-top: 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .team-member__photo img, .team-lead__more span, .team-former__group summary::after { transition: none; }
}
