/* =========================
   FONT — FUTURA BLACK
========================= */

@font-face {
    font-family: "FuturaBlack";
    src: url("fonts/Futura-Black.woff2") format("woff2"),
         url("fonts/Futura-Black.woff") format("woff");
    font-weight: 900;
    font-style: normal;
}

/* =========================
   GLOBAL
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "FuturaBlack", sans-serif;
    font-weight: 900;
}

body {
    background: #cfd3db;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1500px;
    margin: auto;
    padding: 60px 40px 0 40px;
    text-align: center;
}

/* =========================
   ROLES
========================= */

.roles {
    display: flex;
    justify-content: center;
    gap: 90px;
    flex-wrap: wrap;
    margin-bottom: 80px;
}

.role {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    cursor: pointer;
}

.icon {
    width: 170px;
    height: 170px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon img {
    width: 140px;
    height: 140px;
    object-fit: contain;
}

.role p {
    color: #e11d3f;
    font-size: 22px;
    letter-spacing: 2px;
}

/* =========================
   DIAMOND
========================= */

.diamond {
    width: 26px;
    height: 26px;
    border: 3px solid #e11d3f;
    transform: rotate(45deg);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.25s ease;
}

.diamond::after {
    content: "";
    width: 0;
    height: 0;
    background: #37b2b2;
    opacity: 0;
    transition: width 0.25s ease, height 0.25s ease, opacity 0.2s ease;
}

.role.active .diamond::after {
    width: 14px;
    height: 14px;
    opacity: 1;
}

.role.active .diamond {
    transform: rotate(45deg) scale(1.1);
}

/* =========================
   PLAYERS
========================= */

.players-section {
    margin-bottom: 20px;
}

#playersContainer {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.player {
    position: relative;
    width: 200px;
}

.player input {
    display: block;
    width: 100%;
    height: 36px;
    padding: 0 38px 0 15px;
    border: 3px solid #e11d3f;
    color: #e11d3f;
    background: white;
    font-size: 16px;
    outline: none;
}

.player input::placeholder {
    color: crimson;
    opacity: 1;
}

.player input:focus {
    border-color: #37b2b2;
}

.remove {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #e11d3f;
    font-size: 16px;
    cursor: pointer;
}

/* =========================
   ADD BUTTON
========================= */

#addPlayer {
    width: 34px;
    height: 34px;
    border: 3px solid #e11d3f;
    background: white;
    color: #e11d3f;
    font-size: 20px;
    cursor: pointer;
    margin-top: 15px;
}

#addPlayer:hover {
    background: #e11d3f;
    color: white;
}

/* =========================
   PICK BUTTON
========================= */

#pickBtn {
    margin-top: 20px;
    width: 200px;
    height: 50px;
    background: #e11d3f;
    color: white;
    font-size: 30px;
    letter-spacing: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

#pickBtn:hover {
    background: #c11234;
}

#pickBtn:active {
    transform: scale(0.97);
}

/* =========================
   RESULTS SPACE
========================= */

.results-space {
    margin-top: 60px;
    min-height: 220px;
}

/* =========================
   AGENTS GRID
========================= */

.agents-grid {
    margin-top: 70px;
    display: grid;
    grid-template-columns: repeat(auto-fit, 190px);
    gap: 50px;
    justify-content: center; /* centre automatiquement */
    align-items: start;
    width: 100%;
}


/* =========================
   AGENT CARD
========================= */

.agent-card {
    width: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(40px) scale(0.9);
}

.agent-card.show {
    animation: reveal 0.5s ease forwards;
}

@keyframes reveal {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================
   PORTRAIT
========================= */

.agent-portrait {
    width: 190px;
    height: 240px;
    border: 3px solid #e11d3f;
    background: white;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
}

.agent-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-portrait:hover {
    transform: translateY(-6px);
}

/* LOCKED EFFECT */

.agent-portrait.locked {
    animation: lockFlash 0.4s ease-out;
}

@keyframes lockFlash {
    0% { 
        box-shadow: 0 0 0px #e11d3f;
    }
    40% { 
        box-shadow: 0 0 30px #e11d3f;
    }
    100% { 
        box-shadow: 0 0 0px #e11d3f;
    }
}


/* =========================
   PLAYER NAME
========================= */

.agent-player {
    margin-top: 14px;
    font-size: 16px;
    letter-spacing: 3px;
    color: #e11d3f;
    text-align: center;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1200px) {
    .agents-grid {
        grid-template-columns: repeat(3, 190px);
    }
}

@media (max-width: 750px) {
    .agents-grid {
        grid-template-columns: repeat(2, 190px);
    }
}

@media (max-width: 500px) {
    .agents-grid {
        grid-template-columns: 190px;
    }

    .container {
        padding: 40px 20px;
    }

    .roles {
        gap: 40px;
    }

    .icon {
        width: 110px;
        height: 110px;
    }

    .icon img {
        width: 85px;
        height: 85px;
    }

    .role p {
        font-size: 18px;
    }

    .player {
        width: 100%;
        max-width: 300px;
    }

    #pickBtn {
        width: 100%;
        max-width: 300px;
    }
}
