/* ============================================================
   team-modal.css (28/08/2026) — Modal « Team » (front public)
   Grille de 5 slots (admin : jusqu'à 9 membres), overlay
   « En construction » tant qu'aucun membre n'est renseigné.
   Charte : primary #0052CC, secondary #003D99, accent #FFCE32.
   ============================================================ */

.team-modal {
    position: fixed;
    inset: 0;
    z-index: 2004;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.team-modal.open {
    display: flex;
}

.team-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.team-modal-dialog {
    position: relative;
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 14px;
    max-width: 880px;
    width: 100%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.team-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #f0f4ff 0%, #f8f9fa 100%);
}

.team-modal-titles { flex: 1; }

.team-modal-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: #003D99;
}

.team-modal-subtitle {
    margin: .25rem 0 0;
    font-size: .95rem;
    color: #666;
}

.team-modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0 .25rem;
    transition: color .2s;
}

.team-modal-close:hover { color: #003D99; }

.team-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.team-loading { text-align: center; color: #99a; padding: 2rem; font-size: 1.1rem; }

/* --- Grille des 5 slots --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.2rem;
}

.team-card {
    background: #f8f9fa;
    border: 1px solid #e6eaf0;
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    transition: transform .2s, box-shadow .2s;
    position: relative;
}

.team-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,82,204,.12); }

/* --- Photo --- */
.team-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #003D99, #0052CC);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-photo-initials {
    font-size: 2.4rem;
    font-weight: 700;
    color: #FFCE32;
}

.team-photo--empty {
    background: #e9edf2;
    color: #b7c0cc;
    font-size: 2rem;
}

/* --- Slot vide : overlay « En construction » --- */
.team-card--empty { background: #f1f4f8; border-style: dashed; }

.team-empty-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.82);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: 1rem;
    text-align: center;
}

.team-empty-overlay i { font-size: 1.6rem; color: #e0a800; }

.team-empty-overlay span {
    font-size: .8rem;
    font-weight: 600;
    color: #667;
    line-height: 1.35;
}

/* --- Infos membre --- */
.team-info { padding: .9rem .9rem 1rem; }

.team-name {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 700;
    color: #1a2b4a;
}

.team-position {
    margin: .2rem 0 0;
    font-size: .82rem;
    font-weight: 600;
    color: #0052CC;
}

.team-bio {
    margin: .5rem 0 0;
    font-size: .8rem;
    color: #667;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.team-contact {
    display: flex;
    justify-content: center;
    gap: .55rem;
    margin-top: .8rem;
}

.team-cta {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #d5dbe3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0052CC;
    font-size: .85rem;
    text-decoration: none;
    transition: all .2s;
}

.team-cta:hover { background: #0052CC; color: #fff; border-color: #0052CC; }
.team-cta--linkedin { color: #0a66c2; }
.team-cta--linkedin:hover { background: #0a66c2; color: #fff; border-color: #0a66c2; }

@media (max-width: 640px) {
    .team-modal-dialog { max-height: 92vh; }
    .team-modal-header, .team-modal-body { padding: 1rem; }
    .team-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .9rem; }
    .team-modal-title { font-size: 1.2rem; }
}
