/* =========================================
   M&B MOBILE
   ENEMIES.CSS
   UNITÉS ENNEMIES
   Palette gris foncé / anthracite
========================================= */


/* =========================================
   CONTENEUR
========================================= */

.enemy {
    position: absolute;

    width: 28px;
    height: 28px;

    transform:
        translate(-50%, -50%);

    background: transparent !important;

    border: none !important;

    box-shadow: none !important;

    user-select: none;

    pointer-events: none;

    z-index: 20;
}


/* Désactive les anciens pseudo-éléments */

.enemy::before,
.enemy::after {
    content: none !important;
    display: none !important;
}


/* =========================================
   ICÔNE
========================================= */

.enemy-icon {
    position: absolute;

    left: 50%;
    top: 50%;

    width: 22px;
    height: 24px;

    transform:
        translate(-50%, -50%);

    filter:
        drop-shadow(
            1px 2px 1px
            rgba(0, 0, 0, 0.65)
        );
}


/* =========================================
   CORPS
========================================= */

.enemy-body {
    position: absolute;

    left: 50%;
    top: 10px;

    width: 18px;
    height: 11px;

    transform:
        translateX(-50%);

    background: #484b48;

    border:
        1px solid #171917;

    border-radius:
        7px 7px 4px 4px;
}


/* Sac / équipement */

.enemy-body::after {
    content: "";

    position: absolute;

    left: 50%;
    top: 3px;

    width: 8px;
    height: 9px;

    transform:
        translateX(-50%);

    background: #303330;

    border-radius: 2px;
}


/* =========================================
   CASQUE
========================================= */

.enemy-helmet {
    position: absolute;

    left: 50%;
    top: 2px;

    width: 14px;
    height: 11px;

    transform:
        translateX(-50%);

    background: #60635e;

    border:
        1px solid #171917;

    border-radius:
        50% 50% 35% 35%;

    z-index: 3;
}


/* Bord du casque */

.enemy-helmet::after {
    content: "";

    position: absolute;

    left: -2px;
    bottom: 0;

    width: 16px;
    height: 3px;

    background: #383b37;

    border-radius: 3px;
}


/* =========================================
   ARME
========================================= */

.enemy-gun {
    position: absolute;

    left: 16px;
    top: 8px;

    width: 3px;
    height: 21px;

    transform:
        rotate(-15deg);

    transform-origin:
        top center;

    background: #0c0e0c;

    border-radius: 1px;

    z-index: 4;
}


/* Poignée */

.enemy-gun::after {
    content: "";

    position: absolute;

    left: -1px;
    top: 8px;

    width: 5px;
    height: 6px;

    background: #3b3730;

    border-radius: 1px;
}


/* =========================================
   VARIATIONS ENNEMIES
========================================= */

/* Fantassin */

.enemy.rifleman .enemy-body {
    background: #484b48;
}

.enemy.rifleman .enemy-helmet {
    background: #60635e;
}


/* Tireur */

.enemy.marksman .enemy-icon {
    transform:
        translate(-50%, -50%)
        scale(0.95);
}


.enemy.marksman .enemy-body {
    background: #3e4140;
}


.enemy.marksman .enemy-helmet {
    background: #555955;
}


.enemy.marksman .enemy-gun {
    width: 2px;
    height: 28px;

    top: 5px;
}


.enemy.marksman .enemy-gun::before {
    content: "";

    position: absolute;

    left: -2px;
    top: 8px;

    width: 6px;
    height: 3px;

    background: #050605;

    border-radius: 2px;
}


/* Rapide */

.enemy.scout .enemy-icon {
    transform:
        translate(-50%, -50%)
        scale(0.85);
}


.enemy.scout .enemy-body {
    background: #555955;
}


.enemy.scout .enemy-helmet {
    background: #696d67;
}


.enemy.scout .enemy-gun {
    height: 17px;
}


/* Lourd */

.enemy.gunner .enemy-icon {
    transform:
        translate(-50%, -50%)
        scale(1.15);
}


.enemy.gunner .enemy-body {
    width: 20px;

    background: #353837;
}


.enemy.gunner .enemy-helmet {
    background: #4b4f4b;
}


.enemy.gunner .enemy-gun {
    width: 4px;
    height: 25px;

    background: #080a08;
}


/* =========================================
   MORT
========================================= */

.enemy.dead {
    opacity: 0;

    transition:
        opacity 0.5s;
}

/* ==========================================
   TYPES D'ENNEMIS
   ========================================== */

/* FUSILIER
   Standard : on garde le design actuel */
.enemy.rifleman {
    --enemy-accent: #8b8b73;
}


/* ==========================================
   ÉCLAIREUR
   Plus petit / léger
   ========================================== */

.enemy.scout .enemy-icon {
    transform: scale(0.85);
}

.enemy.scout .enemy-helmet {
    background: #6f7d58;
}

.enemy.scout .enemy-body {
    background: #596447;
}

.enemy.scout .enemy-gun {
    width: 14px;
}


/* ==========================================
   MITRAILLEUR
   Plus massif + arme plus imposante
   ========================================== */

.enemy.gunner .enemy-icon {
    transform: scale(1.15);
}

.enemy.gunner .enemy-helmet {
    background: #494c3e;
}

.enemy.gunner .enemy-body {
    background: #3d4034;
}

.enemy.gunner .enemy-gun {
    width: 24px;
    height: 5px;
}


/* ==========================================
   TIREUR D'ÉLITE
   Silhouette fine + long fusil
   ========================================== */

.enemy.marksman .enemy-icon {
    transform: scale(0.95);
}

.enemy.marksman .enemy-helmet {
    background: #4f5948;
}

.enemy.marksman .enemy-body {
    background: #424a3c;
}

.enemy.marksman .enemy-gun {
    width: 30px;
    height: 3px;
}

.enemy-class {
    position: absolute;

    left: 50%;
    top: -17px;

    transform: translateX(-50%);

    font-size: 10px;
    font-weight: 900;

    color: #d8d8c4;

    text-shadow:
        0 1px 2px #000;

    pointer-events: none;
}

.enemy.rifleman .enemy-class {
    display: none;
}

.enemy.scout .enemy-class {
    color: #d6e68a;
}

.enemy.gunner .enemy-class {
    color: #e0b66b;
}

.enemy.marksman .enemy-class {
    color: #d2d2d2;
}

/* ==========================================
   BARRE DE VIE ENNEMIE
   ========================================== */

.enemy-health {
    position: absolute;

    left: 50%;
    top: -8px;

    transform: translateX(-50%);

    width: 30px;
    height: 4px;

    background: rgba(0, 0, 0, 0.75);

    border: 1px solid rgba(255, 255, 255, 0.25);

    border-radius: 2px;

    overflow: hidden;

    opacity: 0;

    transition: opacity 0.15s ease;

    pointer-events: none;
}

.enemy-health.visible {
    opacity: 1;
}

.enemy-health-bar {
    width: 100%;
    height: 100%;

    background: #b83232;

    transition: width 0.15s linear;
}

/* ==========================================
   BOSS - JUGGERNAUT
   ========================================== */

.enemy.boss {
    z-index: 15;
}

.enemy.boss .enemy-icon {
    transform: scale(1.75);
}

.enemy.boss .enemy-helmet {
    background: #292929;
}

.enemy.boss .enemy-body {
    background: #202020;

    width: 18px;
    height: 20px;
}

.enemy.boss .enemy-gun {
    width: 32px;
    height: 6px;

    background: #111;
}

.enemy.boss .enemy-class {
    display: block;

    top: -27px;

    font-size: 11px;

    color: #ff4a4a;

    text-shadow:
        0 0 4px #000,
        0 0 6px #8b0000;
}

.enemy.boss .enemy-health {
    width: 48px;
    height: 6px;

    top: -15px;

    opacity: 1;
}

/* ==========================================
   BOSS - JUGGERNAUT
   ========================================== */

.enemy.boss {
    z-index: 20;
}


/* Boss sensiblement plus gros */

.enemy.boss .enemy-icon {
    transform:
        translate(-50%, -50%)
        scale(1.55);

    filter:
        drop-shadow(0 0 4px rgba(255, 40, 40, 0.7));
}


/* Casque très sombre */

.enemy.boss .enemy-helmet {
    background: #242424;

    border:
        1px solid #8f2929;
}


/* Corps massif */

.enemy.boss .enemy-body {
    width: 18px;
    height: 21px;

    background: #343434;

    border:
        1px solid #151515;
}


/* Arme plus imposante */

.enemy.boss .enemy-gun {
    width: 29px;
    height: 5px;

    background: #171717;
}


/* Nom du boss */

.enemy.boss .enemy-class {
    display: block;

    top: -31px;

    font-size: 10px;
    font-weight: 900;

    color: #ff5555;

    text-shadow:
        0 1px 2px #000,
        0 0 5px #8b0000;
}


/* Barre de vie spéciale */

.enemy.boss .enemy-health {
    width: 55px;
    height: 6px;

    top: -18px;

    opacity: 1;

    border:
        1px solid rgba(255, 255, 255, 0.45);
}


.enemy.boss .enemy-health-bar {
    background: #b82d2d;
}


        /* ==========================================
           COUCHE FINALE DES ENNEMIS
        ========================================== */

        .enemy {
            z-index: 20;
        }


        .enemy.boss {
            z-index: 21;
        }