@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");
}

/* ---------- GLOBAL ---------- */

body {
    margin: 0;
    padding: 0;
    background: url("../image/backr.png") no-repeat center center fixed;
    background-size: cover;
    font-family: "NinjaKage", sans-serif;
}

/* ---------- HEADER ---------- */

#menu-header {
    height: 60px;
    width: 100%;
    background: black;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: center;
    align-items: center;

    color: white;
    font-size: 26px;
    font-weight: bold;

    position: fixed;
    top: 0;
    left: 0;
    z-index: 50;
}

#settings-icon,
#back-menu {
    position: absolute;
    right: 40px;
    top: 8px;
    width: 42px;
    height: 42px;
    cursor: pointer;
    filter: drop-shadow(0 0 5px black);
    transition: transform 0.2s;
}

#settings-icon:hover,
#back-menu:hover {
    transform: scale(1.15);
}

/* ---------- MENU ACCUEIL ---------- */

#menu-title {
    position: absolute;
    top: 70px;
    left: 40px;
    font-size: 60px;
    color: white;
    text-shadow: 0 0 15px black;
}

#menu-center {
    position: absolute;
    top: calc(50% + 30px); /* descend légèrement pour compenser le header */
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center; /* important pour centrer Bonjour */
}


#btn-play {
    padding: 20px 70px;
    font-size: 32px;
    background: rgba(0,0,0,0.55);
    border: none;
    border-radius: 200px;
    cursor: pointer;
    color: white;
    transition: transform 0.2s;
    font-family: "NinjaKage", sans-serif;
}

#btn-play:hover {
    transform: scale(1.05);
}

/* ---------- ROND JOKER ---------- */

#rules-circle {
    position: absolute;
    bottom: 50px;
    right: 55px;
    width: 100px;
    height: 100px;

    border-radius: 50%;
    border: 2px solid white;

    background: url("../image/jokermy.png") no-repeat center center;
    background-size: 80%;
    background-color: rgba(255,255,255,0.2);

    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

#rules-circle:hover {
    transform: scale(1.15);
    background-color: rgba(255,255,255,0.35);
}

/* ---------- OVERLAY RÈGLES ---------- */

#rules-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 99999;
}

.rules-box {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 380px;
    text-align: center;
}

#close-rules {
    margin-top: 20px;
    padding: 10px 20px;
    background: black;
    border: none;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-family: "NinjaKage", sans-serif;
}

/* ==========================================================
        SECTION LOGIN (AJOUTÉE SANS TOUCHER LE RESTE)
   ========================================================== */

#login-container {
    margin-top: 80px; /* descend le bloc sous le header */
        margin-left: -25px;
    width: 100%;
    height: calc(100vh - 140px);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 120px;
}

/* TITRES ANIMÉS */
@keyframes pulseGlow {
    0%   { opacity: 1; text-shadow: 0 0 10px rgba(255,255,255,0.4); }
    50%  { opacity: 0.55; text-shadow: 0 0 35px rgba(255,255,255,1); }
    100% { opacity: 1; text-shadow: 0 0 10px rgba(255,255,255,0.4); }
}

#login-title {
    color: red;
    font-size: 45px;
    font-family: "NinjaKage";
    animation: pulseGlow 2.8s infinite ease-in-out;
}

#create-title {
    color: #00aaff;
    font-size: 45px;
    font-family: "NinjaKage";
    animation: pulseGlow 2.8s infinite ease-in-out;
}

.login-block {
    text-align: center;
}

/* INPUTS */
.login-form input {
    width: 270px;
    padding: 14px;
    margin-top: 18px;

    border-radius: 500px;
    background: rgba(0,0,0,0.45);
    border: none;

    text-align: center;
    color: white;
    font-size: 17px;
}

.login-form input::placeholder {
    color: #ccc;
}

/* BOUTONS */
.login-form button {
    margin-top: 20px;
    padding: 14px 26px;
    font-size: 22px;
    font-family: "NinjaKage";

    color: white;
    background: rgba(0,0,0,0.55);
    border-radius: 500px;
    border: 2px solid white;

    cursor: pointer;
    transition: transform 0.2s;
}

.login-form button:hover {
    transform: scale(1.08);
}

/* LOGO AU CENTRE */
#login-logo {
    width: 180px;
    filter: drop-shadow(0 0 15px black);
    margin: 0 40px;
}

#menu-header {
    height: 60px;
    width: 100%;
    background: black;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between; /* <-- change ici */
    align-items: center;

    color: white;
    font-size: 26px;
    font-weight: bold;

    position: fixed;
    top: 0;
    left: 0;
    padding: 0 40px; /* <-- marges pour respirer */
    box-sizing: border-box;
}

/* ===================== */
/*  FEEDBACK ANIMATION   */
/* ===================== */

#login-feedback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    opacity: 0;
    pointer-events: none;
    transition: opacity 1s;
}

#feedback-logo {
    width: 160px;
    filter: drop-shadow(0 0 10px white);
    transition: transform 1.2s ease;
}

#feedback-text {
    margin-top: 30px;
    font-size: 40px;
    color: white;
    font-family: "NinjaKage";

    opacity: 0;
    text-shadow: 0 0 20px rgba(255,255,255,1);

    animation: glowPulse 2.5s infinite ease-in-out;
}

/* Animation du halo clignotant */
@keyframes glowPulse {
    0% { text-shadow: 0 0 10px rgba(255,255,255,0.5); }
    50% { text-shadow: 0 0 35px rgba(255,255,255,1); }
    100% { text-shadow: 0 0 10px rgba(255,255,255,0.5); }
}

#feedback-logout {
    margin-top: 50px;
    padding: 12px 25px;
    background: rgba(0,0,0,0.6);
    border: 2px solid white;
    color: white;
    font-size: 20px;
    font-family: "NinjaKage";
    border-radius: 500px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 1s;
}

/* Animation shake */
@keyframes shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
    100% { transform: translateX(0); }
}

.error-msg {
    color: red !important;
    text-shadow: 0 0 15px red;
}

.btn-error {
    background: rgba(255,0,0,0.6) !important;
    border-color: red !important;
    animation: shake 0.4s ease;
}
.username-glow {
    color: #00aaff;
    animation: usernamePulse 2.5s infinite;
}

@keyframes usernamePulse {
    0% { text-shadow: 0 0 10px white; opacity: 1; }
    50% { text-shadow: 0 0 25px white; opacity: 0.6; }
    100% { text-shadow: 0 0 10px white; opacity: 1; }
}

#hello-user {
    margin-top: 20px; /* rapproche du bouton */
    font-size: 30px;
    color: white;
    font-family: "NinjaKage";
    text-align: center;
}
/* ==========================
   OVERLAY FILE D'ATTENTE ULTRA SIMPLE
=========================== */

#queue-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* ==========================
   STYLING DES RONDS FILE D’ATTENTE
=========================== */

/* Taille : Jokers BLEU + ROUGE = grands */
.team-circle {
    width: 170px;
    height: 170px;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid white;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background-blend-mode: normal;
}

/* Glow + scale hover */
.team-circle:hover,
.cancel-circle:hover {
    transform: scale(1.12);
    box-shadow: 0 0 25px rgba(255,255,255,0.9);
}

/* Images BLEU et ROUGE */
.team-circle img {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    object-fit: contain;
}



/* Compteur "1" */
.circle-count {
    position: absolute;
    bottom: -15px;
    right: -15px;
    background: white;
    color: black;
    font-size: 32px;
    font-family: Arial, sans-serif;
    padding: 5px 12px;
    border-radius: 50%;
    border: 3px solid black;
    display: none;
}

/* ==========================
   BOUTON ANNULER (Petit rond rouge)
=========================== */

.cancel-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,0,0,0.7);
    border: 4px solid white;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* ==========================
   TITRE ANIMÉ (Rouge -> Bleu -> Rouge…)
=========================== */

#queue-title {
    font-size: 48px;
    color: white;
    font-family: "NinjaKage";
    animation: titlePulse 3s infinite ease-in-out;
}

@keyframes titlePulse {
    0% { text-shadow: 0 0 20px red; color: red; }
    50% { text-shadow: 0 0 20px cyan; color: cyan; }
    100% { text-shadow: 0 0 20px red; color: red; }
}

/* Ajuste l'espace entre les ronds */
#queue-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 90px;
}


/* ===== Bouton JOUER erreur (non connecté) ===== */

.btn-play-error {
    background: rgba(255,0,0,0.7) !important;
    transform: scale(1.08);
    animation: btnShake 0.4s ease;
}

@keyframes btnShake {
    0% { transform: translateX(0) scale(1.08); }
    20% { transform: translateX(-6px) scale(1.08); }
    40% { transform: translateX(6px) scale(1.08); }
    60% { transform: translateX(-6px) scale(1.08); }
    80% { transform: translateX(6px) scale(1.08); }
    100% { transform: translateX(0) scale(1.08); }
}
/* ==========================
   BOUTON RESET FILE D'ATTENTE
=========================== */
#reset-queue-btn {
    margin-top: 40px;
    padding: 12px 25px;
    background: white;
    color: black;
    border: 3px solid #333;
    border-radius: 500px;
    font-size: 18px;
    font-family: "NinjaKage", sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

#reset-queue-btn:hover {
    background: #f0f0f0;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255,255,255,0.5);
}

#reset-queue-btn:active {
    background: #e0e0e0;
    transform: scale(0.98);
}

#queue-title {
    font-size: 48px;
    color: white;
    font-family: "NinjaKage";
    animation: titlePulse 3s infinite ease-in-out;
}

/* Garder l'animation mais permettre la surcharge de couleur */
#queue-title.red-alert {
    animation: none;
    color: red !important;
    text-shadow: 0 0 20px red;
}