/* ========================================
   TEAM GRID
   ======================================== */

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 3rem;
}

/* ========================================
   TEAM CARDS
   ======================================== */

.team-grid .project-card {
    display: flex;
    flex-direction: column;

    width: 100%;
    padding-bottom: 2rem;

    border-color: var(--gold-dark);
}

.team-grid .project-main {
    flex: 1;
}

/* ========================================
   TEAM IMAGE
   ======================================== */

.team-image {
    display: block;

    width: 100%;
    aspect-ratio: 1;

    margin: 2rem auto 1.5rem;

    object-fit: cover;
}

/* ========================================
   TEAM CONTENT
   ======================================== */

.team-grid .project-pitch {
    padding-bottom: 2.5rem;
}

/* ========================================
   TEAM CTA
   ======================================== */

.team-grid .project-link {
    align-self: center;

    margin-top: 2rem;
    margin-bottom: 0;
    padding-bottom: 2.5rem;
}

/* ========================================
   RESPONSIVE TEAM
   ======================================== */

@media (max-width: 760px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

/* faire une place au bouton bug */
.site-nav {
    margin-left: auto;
}

.bug-toggle {
    margin-left: 1.5rem;
}

/* ========================================
   EXPANDABLE AVATAR
   ======================================== */

.team-image--expandable {
    cursor: zoom-in;
}

/* ========================================
   IMAGE OVERLAY
   ======================================== */

.image-overlay {
    position: fixed;
    z-index: 1000;
    inset: 0;

    padding: 2rem;

    display: grid;
    place-items: center;

    background: rgba(5, 5, 5, 0.94);
    backdrop-filter: blur(8px);

    cursor: zoom-out;
}

.image-overlay[hidden] {
    display: none;
}

.image-overlay__image {
    display: block;

    width: auto;
    height: auto;
    max-width: calc(100vw - 4rem);
    max-height: calc(100vh - 4rem);

    object-fit: contain;

    cursor: default;
}

.image-overlay__close {
    position: fixed;
    z-index: 1;
    top: 1.5rem;
    right: 1.5rem;

    width: 3rem;
    height: 3rem;
    padding: 0;

    background: rgba(5, 5, 5, 0.8);
    color: var(--white);

    border: 1px solid rgba(247, 243, 234, 0.25);
    border-radius: 50%;

    font: inherit;
    font-size: 1.8rem;
    line-height: 1;

    cursor: pointer;
}

.image-overlay__close:hover,
.image-overlay__close:focus-visible {
    color: var(--gold-light);
    border-color: var(--gold);
}

body.has-open-overlay {
    overflow: hidden;
}

/*? EASTER EGG  */
/* ========================================
   WIKI MODE — AI / BEL EASTER EGG
   ======================================== */

.project-card.is-wiki-mode {
    background: white;
    color: black;

    /* On garde volontairement la border dorée existante */
    box-shadow: none;
}

.project-card.is-wiki-mode .project-main {
    background: white;
    color: black;
    font-family: Arial, Helvetica, sans-serif;
}

.project-card.is-wiki-mode .wiki-profile {
    padding: 1.5rem;
}

.project-card.is-wiki-mode .wiki-profile__title {
    margin: 0 0 1rem;

    color: black;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.project-card.is-wiki-mode .wiki-profile__image {
    display: block;

    width: 12rem;
    max-width: 100%;
    height: auto;

    margin: 1.5rem auto 1.5rem;

    border: 1px solid #a2a9b1;
}

.project-card.is-wiki-mode .wiki-profile__description {
    margin: 0 0 1rem;

    color: #000000;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
}

.project-card.is-wiki-mode .project-tags {
    margin: 0 0 1rem;
    padding: 0;

    list-style: none;
}

/* .project-card.is-wiki-mode .project-tags li {
    display: inline-block;

    padding: 0.15rem 0.4rem;

    background: #7a7c80;
    border: 1px solid #dfe7f1;
    border-radius: 0;

    color: #e9ecee;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
} */

.project-card.is-wiki-mode .wiki-profile__link,
.project-card.is-wiki-mode .project-link {
    background: white;
    border: none;

    color: #0645ad;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.1rem;
    text-decoration: underline;
}

.project-card.is-wiki-mode .wiki-profile__link:hover,
.project-card.is-wiki-mode .project-link:hover {
    color: #0b0080;
    text-decoration: underline;
}

@media (max-width: 620px) {
    .image-overlay {
        padding: 1rem;
    }

    .image-overlay__image {
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }
}
