@font-face {
    font-family: "NinjaKage";
    src: url("fonts/NinjaKageDemo-Regular.woff2") format("woff2"),
         url("fonts/NinjaKageDemo-Regular.woff") format("woff");
}

@font-face {
    font-family: "NinjaKageRough";
    src: url("fonts/NinjaKageDemo-Rough.woff2") format("woff2"),
         url("fonts/NinjaKageDemo-Rough.woff") format("woff");
}

html, body {
    overflow: hidden;
}

body {
    background: url("image/back.png") no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
    color: white;
    font-family: "NinjaKage", Arial, sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER */
.header {
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    font-family: "NinjaKage", Arial, sans-serif;

    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}


/* MAIN */
.main {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

/* COLUMNS */
.column {
    width: 25%;
    height: 70%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: relative;
}

.topInfo {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

/* PV */
.pvBar {
    width: 200px;
    height: 30px;
    background: #444;
    border-radius: 5px;
    z-index:6;
}

/* JOKER */
.jokerBox {
    width: 75px;
    height: 75px;
    background: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: pointer;
    z-index :5;
    font-family: "NinjaKage", Arial, sans-serif
}

/* ENEMY LABEL */
.enemyLabel {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-family: "NinjaKage", Arial, sans-serif;
}

/* DRONES */
.droneRow {
    display: flex;
    gap: 30px;
}

.droneWrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.barreVie {
    width: 70px;
    height: 20px;
    background: #555;
    border-radius: 4px;
    z-index: 3;
}

.drone {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    transition: 0.3s;
    cursor: pointer;
    z-index: 3;
}

/* COLORS */
.pierre { background: #4d4d4d; }
.feuille { background: #4CAF50; }
.ciseau { background: #4AA3FF; }

/* GAME CENTER (remplace canvasZone) */
.gameCenter {
    width: 40%;
    height: 70%;
    border: 1px dashed #555;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    color: white;
    padding: 20px;
    text-align: center;
    flex-direction: column;
    gap: 20px;
    font-family: "NinjaKage", Arial, sans-serif;
}

/* FOOTER */
.footer {
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: "NinjaKage", Arial, sans-serif;
        padding: 20px;
}

/* SHIPS */
.ship {
    position: absolute;
    top: 65%;
    transform: translateY(-70%);
    width: 350px;
    height: 300px;

    /* plus de background-image ici */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;



    transition: 0.3s;
    z-index: 1;
    cursor: pointer;
}


.ship-left { left: -120px; }
.ship-right { right: -120px; }

.ship.clicable {
    cursor: pointer;
}

/* OVERLAY JOKER */
#jokerOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

#jokerMenu {
    background: rgba(20,20,20,0.9);
    padding: 40px;
    border-radius: 10px;
    display: flex;
    gap: 40px;
}

.jokerChoice {
    padding: 20px 30px;
    font-size: 20px;
    cursor: pointer;
    background: #444;
    color: white;
    border: 2px solid white;
    border-radius: 10px;
    transition: 0.2s;
    font-family: "NinjaKage", Arial, sans-serif;
}

.jokerChoice:hover {
    transform: scale(1.1);
    background: #666;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#canvasZone {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    font-family: "NinjaKage", Arial, sans-serif;
}

/* Nouveau design circulaire avec icônes */
.joker-left,
.joker-right {
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    padding: 20px;
}

.joker-left button,
.joker-right button {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 3px solid white;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 0; /* masque le texte */
    cursor: pointer;
    transition: 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center;

    box-shadow: 0 0 15px rgba(255,255,255,0.25);
}

/* Image pour réparer */
#jokerRepair {
    background-image: url("image/heal.png");
}

/* Image pour bluff */
#jokerBluff {
    background-image: url("image/hell.png");
}

.joker-left button:hover,
.joker-right button:hover {
    transform: scale(1.15);
    background-color: rgba(0,31,255,0.2);
    box-shadow: 0 0 25px rgba(255,255,255,0.45);
}


/* ============================
   BOUTONS BLUFF (Annonce / Réalité)
============================ */

/* BASE : ronds + contour blanc */
.bluffChoiceLeft,
.bluffChoiceRight {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid #fff;
    background-size: 70%;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    transition: 0.25s ease;
    font-size: 0; /* cache le texte */
    font-family: "NinjaKage", Arial, sans-serif;
}

/* ========= ICONES ========= */
.bluffChoiceLeft[data-left="pierre"],
.bluffChoiceRight[data-right="pierre"] {
    background-image: url("image/feu.png");
}

.bluffChoiceLeft[data-left="feuille"],
.bluffChoiceRight[data-right="feuille"] {
    background-image: url("image/eau.png");
}

.bluffChoiceLeft[data-left="ciseau"],
.bluffChoiceRight[data-right="ciseau"] {
    background-image: url("image/rock.png");
}

/* ======================================
   HOVER EFFETS PERSONNALISÉS PAR TYPE
====================================== */

/* PIERRE — Glow orange + fond bleu */
.bluffChoiceLeft[data-left="pierre"]:hover:not(.disabledBtn),
.bluffChoiceRight[data-right="pierre"]:hover:not(:disabled) {
    transform: scale(1.15);
    background-color: rgba(237, 105, 74, 0.5);
    box-shadow: 0 0 20px rgba(255,140,0,0.9);
}

/* FEUILLE — Glow bleu + fond bleu clair */
.bluffChoiceLeft[data-left="feuille"]:hover:not(.disabledBtn),
.bluffChoiceRight[data-right="feuille"]:hover:not(:disabled) {
    transform: scale(1.15);
    background-color: rgba(0,120,255,0.25);
    box-shadow: 0 0 20px rgba(0,120,255,1);
}

/* CISEAUX — Glow noir + fond gris */
.bluffChoiceLeft[data-left="ciseau"]:hover:not(.disabledBtn),
.bluffChoiceRight[data-right="ciseau"]:hover:not(:disabled) {
    transform: scale(1.15);
    background-color: rgba(90,90,90,0.35);
    box-shadow: 0 0 20px rgba(0,0,0,0.9);
}


/* Boutons désactivés = transparents */
.disabledBtn {
    opacity: 0.25;
    filter: grayscale(1);
    cursor: not-allowed;
}



/* Désactivée après choix */
.disabledBtn {
    opacity: 0.25;
    filter: grayscale(1);
    cursor: not-allowed;
}

/* Animation au survol */
.bluffChoiceLeft:hover:not(.disabledBtn),
.bluffChoiceRight:hover:not(:disabled) {
    transform: scale(1.15);
    box-shadow: 0 0 15px white;
}
.bluff-title {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-size: 40px;
    color: white;
    font-weight: bold;
    text-shadow: 0 0 10px black;
    pointer-events: none;
    font-family: "NinjaKage", Arial, sans-serif;
}
#canvasZone {
    position: relative;
}

/* ============================
   FORMULAIRE VÉRIFICATION BLUFF
============================ */

.verifBluffBox {
    text-align: center;
    color: white;
    padding: 20px;
    font-family: "NinjaKage", Arial, sans-serif;
}

.verifTitle {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 25px;
    text-shadow: 0 0 10px black;
    font-family: "NinjaKage", Arial, sans-serif;
}

/* Boutons Vrai/Faux */
.verifButtons {
    display: flex;
    justify-content: center;
    gap: 40px;
}

/* Même taille que les boutons du bluff */
.verifBtn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    font-family: "NinjaKage", Arial, sans-serif;
}

/* VRAI = bleu */
.verifBtn.vrai {
    background: #4AA3FF;
    color: white;
    box-shadow: 0 0 15px #4AA3FF;
}

/* FAUX = rouge */
.verifBtn.faux {
    background: #FF4444;
    color: white;
    box-shadow: 0 0 15px #FF4444;
}

.verifBtn:hover {
    transform: scale(1.15);
}

#my-pierre {
    width: 70px;
    height: 70px;
    

    background-image: url("image/ninja.png");
    background-repeat: no-repeat;

    /* On réduit l'image entière pour qu'une frame = 70px de large */
    background-size: 280px 70px; /* 70px × 4 frames */

    /* Position de la première frame */
    background-position: 0px 0px;

    border-radius: 0%;
    overflow: hidden;

    animation: ninjaLoop 1s steps(4) infinite;
}

#my-pierre {
    background-color: transparent !important;
}


/* Animation : décale la position de -280px pour parcourir 4 frames */
@keyframes ninjaLoop {
    from { background-position: 0px 0px; }
    to   { background-position: -280px 0px; }
}

#my-feuille {
    width: 70px;
    height: 70px;

    background-image: url("image/feuillemy.png");
    background-repeat: no-repeat;

    /* Sprite : 4 frames → 70px × 4 = 280px */
    background-size: 280px 70px;

    /* Commence sur la frame 1 */
    background-position: 0px 0px;

    border-radius: 0%;
    overflow: hidden;

    animation: feuilleLoop 1s steps(4) infinite;
    background-color: transparent !important;
}

/* Animation du sprite (4 steps) */
@keyframes feuilleLoop {
    from { background-position: 0px 0px; }
    to   { background-position: -280px 0px; }
}

#my-ciseau {
    width: 70px;
    height: 70px;

    background-image: url("image/myrock.png");
    background-repeat: no-repeat;

    /* Sprite sheet : 4 frames → 70px × 4 = 280px */
    background-size: 280px 70px;

    /* Frame 1 */
    background-position: 0px 0px;

    border-radius: 0%;
    overflow: hidden;

    animation: ciseauLoop 1s steps(4) infinite;
    background-color: transparent !important;
}

/* Animation du sprite en 4 étapes */
@keyframes ciseauLoop {
    from { background-position: 0px 0px; }
    to   { background-position: -280px 0px; }
}
#enemy-pierre {
    width: 70px;
    height: 70px;

    background-image: url("image/fire.png");
    background-repeat: no-repeat;

    background-size: 280px 70px; /* 4 frames */
    background-position: 0px 0px;

    border-radius: 0%;
    overflow: hidden;

    animation: enemyPierreLoop 1s steps(4) infinite;
    background-color: transparent !important;
}

@keyframes enemyPierreLoop {
    from { background-position: 0px 0px; }
    to   { background-position: -280px 0px; }
}
#enemy-feuille {
    width: 70px;
    height: 70px;

    background-image: url("image/feuille.png");
    background-repeat: no-repeat;

    background-size: 280px 70px;
    background-position: 0px 0px;

    border-radius: 0%;
    overflow: hidden;

    animation: enemyFeuilleLoop 1s steps(4) infinite;
    background-color: transparent !important;
}

@keyframes enemyFeuilleLoop {
    from { background-position: 0px 0px; }
    to   { background-position: -280px 0px; }
}
#enemy-ciseau {
    width: 70px;
    height: 70px;

    background-image: url("image/ninja1.png");
    background-repeat: no-repeat;

    background-size: 280px 70px;
    background-position: 0px 0px;

    border-radius: 0%;
    overflow: hidden;

    animation: enemyCiseauLoop 1s steps(4) infinite;
    background-color: transparent !important;
}

@keyframes enemyCiseauLoop {
    from { background-position: 0px 0px; }
    to   { background-position: -280px 0px; }
}

.drone-disabled {
    opacity: 0.35;
    filter: grayscale(1);
    pointer-events: none;
    transform: scale(1) !important;
}
/* ============================
   TEXTURES DES JOKERS
============================ */

/* Joker du joueur (colonne de gauche) */
#my-joker {
    background-image: url("image/jokermy.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: rotate(0deg); /* retire l'inclinaison si tu veux */
}

/* Joker ennemi (colonne de droite) */
#enemy-joker {
    background-image: url("image/joker.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: rotate(0deg);
}

/* Drone mort gris + animation stoppée */
/* Drone mort */
.drone-damaged {
    filter: grayscale(1) brightness(0.4);
    opacity: 0.5;
    animation: none !important;
}



.drone-no-click {
    pointer-events: none;
}

.drone-alive { filter: grayscale(0); }
/* Bouton VRAI = jokermy.png */
.verifBtn.vrai {
    background: url("image/jokermy.png") center/contain no-repeat !important;
    box-shadow: 0 0 15px #4AA3FF;
    border: none;
}

/* Bouton FAUX = joker.png */
.verifBtn.faux {
    background: url("image/joker.png") center/contain no-repeat !important;
    box-shadow: 0 0 15px #FF4444;
    border: none;
}
#my-joker:hover {
    transform: scale(1.2);
    transition: transform 0.2s ease;
}

/* ============================
   ANIMATION DEGÂT BARRES PV
============================ */
.pvBar, .barreVie {
    position: relative;
    transition: all 0.3s ease;
}

.hpDamageFlash {
    animation: hpDamageAnimation 0.6s ease;
}

@keyframes hpDamageAnimation {
    0% {
        transform: scale(1);
        box-shadow: none;
    }
    25% {
        transform: scale(1.05);
        box-shadow: 0 0 0 3px white, 0 0 20px rgba(255, 68, 68, 0.8);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 0 4px white, 0 0 30px rgba(255, 68, 68, 1);
    }
    75% {
        transform: scale(1.05);
        box-shadow: 0 0 0 3px white, 0 0 20px rgba(255, 68, 68, 0.8);
    }
    100% {
        transform: scale(1);
        box-shadow: none;
    }
}

/* Couleur rouge pendant l'animation */
.hpDamageFlash::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, #FF4444 var(--current-percent), #444 var(--current-percent));
    border-radius: inherit;
    z-index: -1;
}

/* BOUTON RESET */
#reset_game {
    font-family: "NinjaKage", Arial, sans-serif;
}

/* ============================
   STYLE DES MESSAGES DU JEU (Version avec classes)
============================ */

#canvasZone {
    font-family: "NinjaKage", Arial, sans-serif;
    font-size: 32px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    position: relative;
    padding: 20px 40px;
    min-width: 300px;
    text-align: center;
}

/* Message d'attente */
.canvas-waiting {
    animation: pulseGlow 2s infinite ease-in-out;
}

/* Message "C'est votre tour" */
.canvas-your-turn {
    background: rgba(0, 255, 0, 0.2);
    border: 2px solid rgba(0, 255, 0, 0.5);
    animation: yourTurnGlow 1.5s infinite ease-in-out;
}

/* Message de défense */
.canvas-defense {
    background: rgba(255, 165, 0, 0.2);
    border: 2px solid rgba(255, 165, 0, 0.5);
    animation: defenseGlow 1.5s infinite ease-in-out;
}

/* Message de bluff */
.canvas-bluff {
    font-size: 36px;
    background: rgba(138, 43, 226, 0.2);
    border: 2px solid rgba(138, 43, 226, 0.5);
}

/* Message de vérification */
.canvas-verification {
    font-size: 20px;
    background: rgba(255, 215, 0, 0.2);
    border: 2px solid rgba(255, 215, 0, 0.5);
}

@keyframes pulseGlow {
    0% {
        background: rgba(255, 255, 255, 0.15);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    }
    50% {
        background: rgba(255, 255, 255, 0.25);
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
    }
    100% {
        background: rgba(255, 255, 255, 0.15);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    }
}

@keyframes yourTurnGlow {
    0% {
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 35px rgba(0, 255, 0, 0.6);
    }
    100% {
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    }
}

@keyframes defenseGlow {
    0% {
        box-shadow: 0 0 20px rgba(255, 165, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 35px rgba(255, 165, 0, 0.6);
    }
    100% {
        box-shadow: 0 0 20px rgba(255, 165, 0, 0.3);
    }
}

#historique {
    width: 100%;
    text-align: center;
    margin-top: 10px;
    color: white;
    font-size: 18px;
    font-family: Arial, sans-serif; /* pas NinjaKage */
}

.histo-line {
    background: rgba(255,255,255,0.15);
    padding: 6px 12px;
    margin: 4px auto;
    border-radius: 6px;
    width: 90%;
    animation: fadeIn 0.3s ease;
}
#my-joker,
#my-joker span,
#enemy-joker,
#enemy-joker span {
    color: white !important;
    text-shadow: 0 0 5px black;
    font-family: Arial, sans-serif !important;
}


