/* ==================================================
   RÉGLAGES GÉNÉRAUX
================================================== */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    color: white;

    background:
        radial-gradient(
            circle at 20% 10%,
            rgba(255, 183, 60, 0.10),
            transparent 30%
        ),
        radial-gradient(
            circle at 80% 90%,
            rgba(88, 101, 242, 0.10),
            transparent 35%
        ),
        linear-gradient(
            180deg,
            #0c0d0f 0%,
            #15171c 100%
        );
}


button,
input {
    font-family: inherit;
}


button {
    cursor: pointer;
}


.cache {
    display: none !important;
}



/* ==================================================
   PAGE D'ACCUEIL
================================================== */

.ecran-accueil {
    position: relative;

    min-height: 100vh;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 40px 20px;

    overflow: hidden;
}



/* ==================================================
   HALOS
================================================== */

.halo {
    position: absolute;

    width: 450px;
    height: 450px;

    border-radius: 50%;

    filter: blur(100px);

    opacity: 0.20;

    pointer-events: none;
}


.halo-gauche {
    background: #ffb52e;

    top: -180px;
    left: -180px;
}


.halo-droite {
    background: #5865f2;

    bottom: -200px;
    right: -180px;
}



/* ==================================================
   CARTE ACCUEIL
================================================== */

.carte-accueil {
    position: relative;

    width: 100%;
    max-width: 720px;

    padding: 35px 45px;

    text-align: center;

    border-radius: 28px;

    background:
        linear-gradient(
            145deg,
            rgba(31, 33, 38, 0.96),
            rgba(18, 19, 23, 0.96)
        );

    border: 1px solid rgba(255, 196, 76, 0.20);

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    backdrop-filter: blur(16px);
}



/* ==================================================
   LOGO DRAGON
================================================== */

.logo-zone {
    display: flex;

    justify-content: center;
    align-items: center;

    margin-bottom: 5px;
}


.logo-dragon {
    width: 200px;
    height: 200px;

    object-fit: contain;

    filter:
        drop-shadow(
            0 0 15px rgba(255, 190, 60, 0.30)
        )
        drop-shadow(
            0 0 40px rgba(255, 150, 20, 0.10)
        );
}



/* ==================================================
   BADGE
================================================== */

.badge {
    display: inline-block;

    margin: 0 0 12px;

    padding: 7px 16px;

    border-radius: 50px;

    font-size: 12px;
    font-weight: bold;

    letter-spacing: 2px;

    color: #ffc85a;

    background: rgba(255, 190, 60, 0.08);

    border: 1px solid rgba(255, 190, 60, 0.20);
}



/* ==================================================
   TITRE
================================================== */

.carte-accueil h1 {
    margin: 5px 0 10px;

    font-size: clamp(
        34px,
        7vw,
        60px
    );

    line-height: 1;

    letter-spacing: 2px;

    background:
        linear-gradient(
            180deg,
            #ffffff,
            #d7d7d7
        );

    background-clip: text;

    -webkit-background-clip: text;

    color: transparent;
}



/* ==================================================
   DESCRIPTION
================================================== */

.description-accueil {
    max-width: 520px;

    margin: 15px auto;

    color: #b9bbc4;

    font-size: 16px;

    line-height: 1.6;
}



/* ==================================================
   RÈGLES
================================================== */

.regles-accueil {
    display: inline-block;

    margin: 10px 0 28px;

    padding: 10px 18px;

    border-radius: 12px;

    color: #d9d9dc;

    font-size: 14px;

    background: rgba(255, 255, 255, 0.04);

    border: 1px solid rgba(255, 255, 255, 0.06);
}



/* ==================================================
   ZONE DIFFICULTÉ
================================================== */

.zone-difficulte {
    margin-top: 5px;
    margin-bottom: 28px;
}


.titre-difficulte {
    margin-bottom: 14px;

    color: #9497a3;

    font-size: 12px;
    font-weight: bold;

    letter-spacing: 2px;
}



/* ==================================================
   BOUTONS DIFFICULTÉ
================================================== */

.boutons-difficulte {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 12px;
}


.bouton-niveau {
    position: relative;

    min-height: 58px;

    padding: 13px 10px;

    border-radius: 15px;

    border: 1px solid rgba(255, 255, 255, 0.08);

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.055),
            rgba(255, 255, 255, 0.018)
        );

    color: #d8d9df;

    font-size: 14px;
    font-weight: 800;

    letter-spacing: 0.5px;

    transition:
        transform 0.20s ease,
        border-color 0.20s ease,
        background 0.20s ease,
        box-shadow 0.20s ease;
}


.bouton-niveau:hover {
    transform: translateY(-3px);
}



/* ==================================================
   FACILE
================================================== */

.bouton-niveau[data-niveau="facile"]:hover {
    border-color: rgba(65, 220, 120, 0.65);

    background:
        linear-gradient(
            180deg,
            rgba(65, 220, 120, 0.14),
            rgba(65, 220, 120, 0.03)
        );

    box-shadow:
        0 10px 30px rgba(65, 220, 120, 0.10);
}


.bouton-niveau[data-niveau="facile"].actif {
    color: #83f0aa;

    border-color: #41dc78;

    background:
        linear-gradient(
            180deg,
            rgba(65, 220, 120, 0.20),
            rgba(65, 220, 120, 0.05)
        );

    box-shadow:
        0 0 0 1px rgba(65, 220, 120, 0.10),
        0 10px 35px rgba(65, 220, 120, 0.15);
}



/* ==================================================
   MOYEN
================================================== */

.bouton-niveau[data-niveau="moyen"]:hover {
    border-color: rgba(255, 167, 45, 0.70);

    background:
        linear-gradient(
            180deg,
            rgba(255, 167, 45, 0.14),
            rgba(255, 167, 45, 0.03)
        );

    box-shadow:
        0 10px 30px rgba(255, 167, 45, 0.10);
}


.bouton-niveau[data-niveau="moyen"].actif {
    color: #ffc066;

    border-color: #ffa72d;

    background:
        linear-gradient(
            180deg,
            rgba(255, 167, 45, 0.20),
            rgba(255, 167, 45, 0.05)
        );

    box-shadow:
        0 0 0 1px rgba(255, 167, 45, 0.10),
        0 10px 35px rgba(255, 167, 45, 0.15);
}



/* ==================================================
   DIFFICILE
================================================== */

.bouton-niveau[data-niveau="difficile"]:hover {
    border-color: rgba(255, 80, 90, 0.70);

    background:
        linear-gradient(
            180deg,
            rgba(255, 80, 90, 0.14),
            rgba(255, 80, 90, 0.03)
        );

    box-shadow:
        0 10px 30px rgba(255, 80, 90, 0.10);
}


.bouton-niveau[data-niveau="difficile"].actif {
    color: #ff8c94;

    border-color: #ff505a;

    background:
        linear-gradient(
            180deg,
            rgba(255, 80, 90, 0.20),
            rgba(255, 80, 90, 0.05)
        );

    box-shadow:
        0 0 0 1px rgba(255, 80, 90, 0.10),
        0 10px 35px rgba(255, 80, 90, 0.15);
}



/* ==================================================
   BOUTON JOUER
================================================== */

#bouton-jouer {
    width: 100%;

    min-height: 60px;

    border: none;

    border-radius: 16px;

    color: white;

    font-size: 17px;
    font-weight: 900;

    letter-spacing: 2px;

    background:
        linear-gradient(
            135deg,
            #6c78ff,
            #5865f2
        );

    box-shadow:
        0 15px 35px rgba(88, 101, 242, 0.30);

    transition:
        transform 0.20s ease,
        box-shadow 0.20s ease,
        filter 0.20s ease;
}


#bouton-jouer:hover {
    transform: translateY(-3px);

    filter: brightness(1.08);

    box-shadow:
        0 20px 45px rgba(88, 101, 242, 0.40);
}


#bouton-jouer:active {
    transform: translateY(0);
}



/* ==================================================
   TEXTE DISCORD
================================================== */

.texte-compte {
    margin-top: 18px;
    margin-bottom: 0;

    color: #6f727d;

    font-size: 12px;
}



/* ==================================================
   ÉCRAN DU JEU
================================================== */

.jeu {
    width: 100%;
    max-width: 950px;

    margin: 0 auto;

    padding: 35px 20px 60px;
}



/* ==================================================
   HAUT DU JEU
================================================== */

.haut-jeu {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 20px;
}


.haut-jeu h2 {
    margin: 0 0 5px;

    font-size: 28px;
}


#categorie {
    margin: 0;

    color: #9fa2ad;
}



/* ==================================================
   BOUTON NOUVELLE PARTIE
================================================== */

#bouton-nouvelle-partie {
    padding: 12px 18px;

    border-radius: 12px;

    border: 1px solid rgba(255, 255, 255, 0.10);

    color: white;

    background: rgba(255, 255, 255, 0.05);

    transition: 0.2s;
}


#bouton-nouvelle-partie:hover {
    background: rgba(255, 255, 255, 0.10);

    transform: translateY(-2px);
}



/* ==================================================
   INFORMATIONS DU JEU
================================================== */

.infos-jeu {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 12px;

    margin-bottom: 18px;
}


.info {
    padding: 15px;

    text-align: center;

    border-radius: 14px;

    background: rgba(255, 255, 255, 0.045);

    border: 1px solid rgba(255, 255, 255, 0.06);
}


.info span {
    display: block;

    margin-bottom: 6px;

    color: #858893;

    font-size: 12px;

    text-transform: uppercase;

    letter-spacing: 1px;
}


.info strong {
    font-size: 22px;
}



/* ==================================================
   IMAGE
================================================== */

.zone-image {
    position: relative;

    width: 100%;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    border-radius: 18px;

    background: #08090b;

    border: 1px solid rgba(255, 255, 255, 0.08);

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.40);
}


#image-mystere {
    position: absolute;

    width: 100%;
    height: 100%;

    object-fit: cover;

    inset: 0;
}



/* ==================================================
   GRILLE DE CASES
================================================== */

.grille-cache,
#grille-cache {
    position: absolute;

    inset: 0;

    display: grid;

    grid-template-columns:
        repeat(8, 1fr);

    grid-template-rows:
        repeat(8, 1fr);

    z-index: 2;
}


.case-cache {
    width: 100%;
    height: 100%;

    background:
        linear-gradient(
            145deg,
            #26282f,
            #17191e
        );

    border: 1px solid rgba(255, 255, 255, 0.045);

    opacity: 1;

    visibility: visible;

    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}



/* ==================================================
   ZONE RÉPONSE
================================================== */

.zone-reponse {
    display: flex;

    gap: 10px;

    margin-top: 18px;
}


#champ-reponse {
    flex: 1;

    min-width: 0;

    padding: 15px 16px;

    border-radius: 13px;

    border: 1px solid rgba(255, 255, 255, 0.10);

    outline: none;

    color: white;

    background: rgba(255, 255, 255, 0.055);

    font-size: 16px;

    transition: 0.2s;
}


#champ-reponse:focus {
    border-color: #5865f2;

    box-shadow:
        0 0 0 3px rgba(88, 101, 242, 0.15);
}


#champ-reponse::placeholder {
    color: #70737d;
}



/* ==================================================
   BOUTON VALIDER
================================================== */

#bouton-valider {
    padding: 0 28px;

    border: none;

    border-radius: 13px;

    color: white;

    font-weight: bold;

    background:
        linear-gradient(
            135deg,
            #6c78ff,
            #5865f2
        );

    transition: 0.2s;
}


#bouton-valider:hover {
    transform: translateY(-2px);

    filter: brightness(1.10);
}


#bouton-valider:disabled,
#champ-reponse:disabled {
    opacity: 0.45;

    cursor: not-allowed;
}



/* ==================================================
   MESSAGE
================================================== */

.message {
    min-height: 25px;

    margin-top: 15px;

    text-align: center;

    font-size: 16px;
    font-weight: bold;
}



/* ==================================================
   CONNEXION DISCORD ET CLASSEMENT
================================================== */

.bouton-classement,
.bouton-discord {
    width: 100%;
    min-height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-top: 13px;
    padding: 13px 18px;

    border-radius: 14px;
    text-decoration: none;

    color: white;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 1px;

    transition: 0.2s;
}

.bouton-discord-principal {
    min-height: 64px;
    font-size: 16px;
    border: 1px solid rgba(255, 200, 90, 0.30);
}


.bouton-classement {
    color: #ffc85a;
    border: 1px solid rgba(255, 196, 76, 0.30);
    background: rgba(255, 190, 60, 0.075);
}


.bouton-discord {
    background: linear-gradient(135deg, #6c78ff, #5865f2);
    box-shadow: 0 12px 30px rgba(88, 101, 242, 0.22);
}


.bouton-classement:hover,
.bouton-discord:hover,
.bouton-classement-jeu:hover,
.retour-accueil:hover {
    transform: translateY(-2px);
    filter: brightness(1.10);
}


.compte-discord {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-top: 16px;
    padding: 12px 14px;

    text-align: left;
    border-radius: 14px;
    border: 1px solid rgba(88, 101, 242, 0.22);
    background: rgba(88, 101, 242, 0.08);
}


.avatar-discord,
.avatar-classement {
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(255, 200, 90, 0.55);
}


.avatar-discord {
    width: 46px;
    height: 46px;
}


.compte-discord-texte {
    flex: 1;
    min-width: 0;
}


.compte-discord-texte span,
.compte-discord-texte strong {
    display: block;
}


.compte-discord-texte span {
    margin-bottom: 3px;
    color: #8f93a0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}


.compte-discord-texte strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.lien-deconnexion {
    color: #aeb1bc;
    font-size: 12px;
}


.actions-jeu {
    display: flex;
    align-items: center;
    gap: 10px;
}


.bouton-classement-jeu,
.retour-accueil {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 18px;
    border-radius: 12px;
    text-decoration: none;

    color: #ffc85a;
    border: 1px solid rgba(255, 196, 76, 0.24);
    background: rgba(255, 190, 60, 0.06);

    transition: 0.2s;
}


.notifications {
    position: fixed;
    top: 18px;
    left: 50%;
    z-index: 20;

    width: min(92%, 560px);
    transform: translateX(-50%);
}


.notification {
    margin: 0 0 8px;
    padding: 13px 18px;

    text-align: center;
    border-radius: 12px;
    backdrop-filter: blur(15px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
}


.notification-succes {
    color: #8cf2b0;
    border: 1px solid rgba(65, 220, 120, 0.35);
    background: rgba(25, 75, 45, 0.94);
}


.notification-erreur {
    color: #ffafb4;
    border: 1px solid rgba(255, 80, 90, 0.35);
    background: rgba(85, 28, 34, 0.94);
}


/* ==================================================
   PAGE CLASSEMENT
================================================== */

.page-classement {
    width: 100%;
    max-width: 900px;

    margin: 0 auto;
    padding: 35px 20px 70px;
}


.entete-classement {
    margin-bottom: 24px;
}


.titre-classement {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;

    margin-top: 25px;
    text-align: left;
}


.titre-classement h1 {
    margin: 4px 0;
    font-size: clamp(32px, 7vw, 54px);
    letter-spacing: 2px;
}


.titre-classement p {
    margin: 0;
    color: #999ca7;
}


.logo-classement {
    width: 125px;
    height: 125px;
    object-fit: contain;
    filter: drop-shadow(0 0 22px rgba(255, 183, 60, 0.22));
}


.onglets-classement {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 9px;

    margin-bottom: 17px;
}


.onglet-classement {
    padding: 12px 8px;

    text-align: center;
    text-decoration: none;
    color: #aeb0b9;
    font-weight: 800;

    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.035);
}


.onglet-classement.actif {
    color: #ffc85a;
    border-color: rgba(255, 196, 76, 0.45);
    background: rgba(255, 190, 60, 0.10);
}


.carte-classement,
.ma-position,
.invitation-connexion {
    overflow: hidden;

    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    background: rgba(24, 26, 31, 0.94);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}


.ligne-classement {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 130px;
    align-items: center;
    gap: 12px;

    min-height: 72px;
    padding: 11px 20px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}


.ligne-classement:last-child {
    border-bottom: none;
}


.entete-tableau {
    min-height: 48px;
    color: #777b86;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}


.entete-tableau span:last-child,
.points-classement {
    text-align: right;
}


.position-classement {
    color: #d8d9df;
    font-size: 18px;
}


.joueur-classement {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}


.joueur-classement span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 750;
}


.avatar-classement {
    width: 44px;
    height: 44px;
}


.points-classement {
    color: #ffc85a;
}


.ligne-moi {
    background: linear-gradient(
        90deg,
        rgba(88, 101, 242, 0.14),
        rgba(255, 190, 60, 0.055)
    );
    box-shadow: inset 3px 0 0 #5865f2;
}


.classement-vide {
    margin: 0;
    padding: 45px 20px;
    text-align: center;
    color: #858893;
}


.ma-position {
    margin-top: 18px;
}


.ma-position > p {
    margin: 0;
    padding: 12px 20px 0;
    color: #858893;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
}


.invitation-connexion {
    margin-top: 18px;
    padding: 22px;
    text-align: center;
}


.invitation-connexion p {
    margin-top: 0;
    color: #a8abb5;
}



/* ==================================================
   TÉLÉPHONE / PETITS ÉCRANS
================================================== */

@media (max-width: 700px) {

    .carte-accueil {
        padding: 25px 18px;
    }


    .logo-dragon {
        width: 155px;
        height: 155px;
    }


    .boutons-difficulte {
        grid-template-columns: 1fr;
    }


    .bouton-niveau {
        min-height: 52px;
    }


    .haut-jeu {
        flex-direction: column;

        align-items: stretch;
    }


    .actions-jeu {
        flex-direction: column;
        align-items: stretch;
    }


    .bouton-classement-jeu {
        width: 100%;
    }


    #bouton-nouvelle-partie {
        width: 100%;
    }


    .infos-jeu {
        gap: 7px;
    }


    .info {
        padding: 12px 5px;
    }


    .info strong {
        font-size: 18px;
    }


    .zone-reponse {
        flex-direction: column;
    }


    #champ-reponse,
    #bouton-valider {
        width: 100%;
        min-height: 52px;
    }


    .titre-classement {
        flex-direction: column;
        text-align: center;
    }


    .logo-classement {
        width: 100px;
        height: 100px;
    }


    .onglets-classement {
        grid-template-columns: repeat(2, 1fr);
    }


    .ligne-classement {
        grid-template-columns: 62px minmax(0, 1fr) 88px;
        gap: 8px;
        padding: 10px 12px;
    }


    .avatar-classement {
        width: 38px;
        height: 38px;
    }


    .points-classement {
        font-size: 14px;
    }

}
