/**
 * Vision Jeunesse Nouvelle — Staff Directory
 * Editorial team directory: a leadership band, then staff grouped by
 * department — not a single undifferentiated grid of identical cards.
 * Scoped under .staff-page so it cannot leak site-wide.
 */

.staff-page {
    --sf-navy: #092047;
    --sf-blue: #0d47a1;
    --sf-teal: #00695c;
}

/* ------------------------------------------------------------- intro band */

.staff-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--sf-navy) 0%, var(--sf-blue) 50%, var(--sf-teal) 100%);
    color: #fff;
}

.staff-hero__pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1.5px, transparent 1.5px);
    background-size: 28px 28px;
    opacity: 0.6;
    pointer-events: none;
}

/* ---------------------------------------------------------------- toolbar */

.staff-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.staff-search {
    position: relative;
    flex: 1 1 260px;
    min-width: 0;
}

.staff-search input {
    width: 100%;
    padding: 0.6rem 0.9rem 0.6rem 2.3rem;
    border: 1px solid #e2e8f0;
    border-radius: 100px;
    background: #fff;
    font-size: 0.875rem;
}

.staff-search input:focus {
    outline: none;
    border-color: var(--sf-blue);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.12);
}

.staff-search i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.staff-select {
    padding: 0.6rem 2rem 0.6rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 100px;
    background: #fff;
    color: #334155;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* ------------------------------------------------------------- leadership */

.staff-section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--sf-blue);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.staff-section-label i {
    color: #ffc107;
}

.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.5rem;
}

.lead-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.lead-card__photo {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    margin-bottom: 0.85rem;
}

.lead-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.lead-card:hover .lead-card__photo img {
    transform: scale(1.05);
}

.lead-card__initials {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: rgba(9, 32, 71, 0.35);
}

.lead-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border-radius: 100px;
    background: rgba(255, 193, 7, 0.95);
    color: #78350f;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
}

.lead-card__name {
    margin: 0 0 0.15rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    transition: color 0.2s ease;
}

.lead-card:hover .lead-card__name {
    color: var(--sf-blue);
}

.lead-card__role {
    margin: 0;
    font-size: 0.8125rem;
    color: #64748b;
}

/* --------------------------------------------------------- department rail */

.dept-block {
    margin-bottom: 3rem;
}

.dept-block__head {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.dept-block__title {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: #0f172a;
}

.dept-block__count {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #94a3b8;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1.1rem;
}

.staff-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.staff-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    transform: translateY(-3px);
}

.staff-card__photo {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 11px;
    overflow: hidden;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    margin-bottom: 0.75rem;
}

.staff-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-card__initials {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sf-blue);
    opacity: 0.55;
}

.staff-card__name {
    margin: 0 0 0.1rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
}

.staff-card__role {
    margin: 0;
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.4;
}

/* ---------------------------------------------------------------- states */

.staff-empty {
    text-align: center;
    padding: 4rem 1.5rem;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #f8fafc;
}

/* ------------------------------------------------------------ focus/motion */

.staff-page a:focus-visible,
.staff-page button:focus-visible,
.staff-page input:focus-visible,
.staff-page select:focus-visible {
    outline: 2px solid var(--sf-blue);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .staff-card, .lead-card__photo img {
        transition: none;
    }
    .staff-card:hover {
        transform: none;
    }
}

/* ================================================================ PROFILE */

.profile-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--sf-navy) 0%, var(--sf-blue) 55%, var(--sf-teal) 100%);
    color: #fff;
}

.profile-hero__pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1.5px, transparent 1.5px);
    background-size: 28px 28px;
    opacity: 0.55;
    pointer-events: none;
}

.profile-photo {
    width: 168px;
    height: 168px;
    border-radius: 20px;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
    flex-shrink: 0;
}

.profile-photo-fallback {
    width: 168px;
    height: 168px;
    border-radius: 20px;
    border: 4px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.28);
    background: rgba(255, 255, 255, 0.1);
    display: grid;
    place-items: center;
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.profile-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.profile-link-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    transform: translateY(-2px);
}

.profile-section {
    padding-top: 2.5rem;
    padding-bottom: 0.5rem;
}

.profile-section__title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
    font-family: 'Poppins', sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: #0f172a;
}

.profile-section__title i {
    color: var(--sf-blue);
}

.profile-bio {
    font-size: 1rem;
    line-height: 1.8;
    color: #334155;
}

.profile-bio p {
    margin-bottom: 1.1rem;
}

.profile-bio h3, .profile-bio h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
}

.profile-meta-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    padding: 1.5rem;
}

.profile-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.profile-meta-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.profile-meta-row i {
    color: var(--sf-blue);
    width: 20px;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.related-project-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.related-project-card:hover {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.related-project-card__img {
    width: 84px;
    height: 84px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f1f5f9;
}

@media (prefers-reduced-motion: reduce) {
    .profile-link-btn, .related-project-card {
        transition: none;
    }
    .profile-link-btn:hover, .related-project-card:hover {
        transform: none;
    }
}

@media (max-width: 767.98px) {
    .profile-photo, .profile-photo-fallback {
        width: 120px;
        height: 120px;
        border-radius: 16px;
    }
}
