*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{

    font-family:Arial,Helvetica,sans-serif;

    background:
        radial-gradient(circle at top,#29487d 0%,#13233d 35%,#08111d 100%);

    min-height:100vh;

    display:flex;

    justify-content:center;

    align-items:center;

    color:#ffffff;

}

.container{
	position:relative;

    width:min(1100px,95%);

    padding:40px;

    border-radius:25px;

    background:rgba(255,255,255,.08);

    backdrop-filter:blur(15px);

    border:1px solid rgba(255,255,255,.15);

    box-shadow:
        0 0 40px rgba(0,0,0,.45);

}

h1{

    text-align:center;

    font-family:'Orbitron',sans-serif;

    letter-spacing:clamp(2px,0.8vw,8px);

    font-size:clamp(24px,6vw,42px);

    white-space:nowrap;

    margin-bottom:35px;

    text-shadow:0 0 20px #5aa8ff;

}

.jeu{

    display:grid;

    grid-template-columns:1fr 320px;

    gap:40px;

    align-items:center;

}

.mot{

    display:flex;
    justify-content:center;
    align-items:center;
    flex-wrap:nowrap;

    max-width:100%;
    overflow-x:hidden;

    margin:auto;

}

.case{
    border-radius:12%;
    border:2px solid rgba(255,255,255,.15);
    background:rgba(255,255,255,.06);

    display:flex;
    justify-content:center;
    align-items:center;

    font-weight:bold;
    font-family:'Orbitron',sans-serif;

    box-shadow:inset 0 0 10px rgba(255,255,255,.05);
}

.pendu{

    display:flex;

    justify-content:center;

}

svg{

    width:100%;

    max-width:260px;

}

svg line,
svg circle{

    stroke:#8fd2ff;

    stroke-width:5;

    fill:none;

    stroke-linecap:round;

    stroke-linejoin:round;

    filter:drop-shadow(0 0 10px #4aa7ff);

}

#pendu line,
#pendu circle{

    opacity:0;

    transform:scale(.6);

    transform-origin:center;

    transition:
        opacity .35s ease,
        transform .35s ease;

}

.clavier{

    margin-top:45px;

    display:grid;

    grid-template-columns:repeat(13,1fr);

    gap:10px;

}

.clavier button{

    height:52px;

    border:none;

    border-radius:12px;

    background:#1b4d8a;

    color:white;

    font-size:20px;

    font-weight:bold;

    cursor:pointer;

    transition:.25s;

}

.clavier button:hover{

    transform:translateY(-3px);

    background:#2b73cc;

    box-shadow:0 0 18px #58a8ff;

}

.infos{

    margin-top:35px;

    text-align:center;

    font-size:24px;

    letter-spacing:2px;

}

.nouveau,
.secondaire {

    display:block;
	
	width:290px; 

    margin:0;

    border:none;

    border-radius:15px;

    padding:18px 45px;

    background:#00b4ff;

    color:white;

    font-size:22px;

    cursor:pointer;

    transition:.3s;

}

.nouveau:hover, .secondaire:hover {

    transform:scale(1.05);

    box-shadow:0 0 20px #00b4ff;

}

.secondaire{
    display:none;
}

.actions-fin{

    display:flex;
    justify-content:center;
    align-items:stretch;
    gap:16px;
    margin-top:35px;

}

@media(max-width:900px){

    .jeu{

        grid-template-columns:1fr;

    }

    .pendu{

        order:-1;

    }

    .clavier{

        grid-template-columns:repeat(7,1fr);

    }

    .case{

        width:55px;
        height:65px;
        font-size:32px;

    }

}

#socle,
#poteau,
#traverse,
#corde,
#tete,
#corps,
#brasG,
#brasD,
#jambeG,
#jambeD
{
    opacity: 0;
}

#message{

    height:70px;

    display:flex;

    justify-content:center;

    align-items:center;

    text-align:center;

    white-space:nowrap;

    font-size:clamp(16px,3vw,28px);

    font-weight:bold;

    color:#06D6A0;

    opacity:0;

    transition:opacity .3s;

}

#message.visible{
    opacity:1;
}

.droite{
    display:flex;
    flex-direction:column;
    align-items:center;
}

.lettre{

    display:inline-block;

    animation:apparitionLettre .25s ease-out;

}

@keyframes apparitionLettre{

    0%{

        opacity:0;
        transform:scale(0);

    }

    70%{

        opacity:1;
        transform:scale(1.25);

    }

    100%{

        transform:scale(1);

    }

}

@keyframes dessiner {

    to {
        stroke-dashoffset: 0;
    }

}

.categorie{
    display:inline-flex;
    align-items:center;
    gap:10px;

    margin:0 auto 25px;
    padding:10px 24px;

    border:2px solid rgba(143,210,255,.4);
    border-radius:30px;
    background:rgba(143,210,255,.08);

    color:#8fd2ff;
    font-family:'Orbitron',sans-serif;
    font-size:22px;
    font-weight:bold;
    letter-spacing:3px;
    text-transform:uppercase;

    box-shadow:
        inset 0 0 15px rgba(90,168,255,.15),
        0 0 15px rgba(90,168,255,.25);
}

.categorie .icone{
    font-size:28px;
    text-shadow:none;
    filter:none;
}

.categorie .texte{
    text-shadow:0 0 10px #4aa7ff;
}

#score {
    position: relative;
    display: inline-block;
}

#gain-score {
    position: absolute;
    left: 30px;
    top: 0;
    font-size: 32px;
    font-weight: bold;
    color: #28a745;
    opacity: 0;
    pointer-events: none;
}

#gain-score.animation {
    animation: gainPoints 1.8s ease-out;
}

@keyframes gainPoints {

    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }

    15% {
        opacity: 1;
        transform: translateY(-8px) scale(1.5);
    }

    60% {
        opacity: 1;
        transform: translateY(-35px) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: translateY(-70px) scale(1);
    }
}

#grade {
    margin-top: 6px;
    font-size: 20px;
    font-weight: bold;
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
}

#grade.nouveau {
    animation: gradePop 0.8s ease;
}

@keyframes gradePop {
    0% {
        transform: scale(0.8);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.popup-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.75);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:10000;
}

.popup{
    width:420px;
    max-width:90%;
    background:#133b5c;
    border:3px solid #f6c443;
    border-radius:14px;
    padding:25px;
    color:white;
    text-align:center;
    box-shadow:0 0 25px rgba(0,0,0,.5);
}

.popup h2{
    margin-top:0;
    color:#FFD34D;
}

.resume-score{
    margin:20px 0;
    font-size:18px;
    line-height:1.8em;
}

.popup label{
    display:block;
    margin-bottom:8px;
    font-weight:bold;
}

.popup input{
    width:100%;
    box-sizing:border-box;
    padding:10px;
    border-radius:8px;
    border:none;
    font-size:18px;
    text-align:center;
}

.popup small{
    display:block;
    margin-top:8px;
    color:#ddd;
}

.popup-boutons{
    margin-top:25px;
    display:flex;
    justify-content:space-between;
    gap:15px;
}

.popup-boutons button{
    flex:1;
}

#btn-enregistrer { 
    visibility:hidden;
    opacity:0;
    pointer-events:none;
    transition:opacity .3s;
    margin-top:10px;
    padding:6px 14px;
    font-size:13px;
    font-family:'Orbitron',sans-serif;
    font-weight:600;
    color:#fff;
    background:#0A6ED1;
    border:1px solid #4EA3FF;
    border-radius:8px;
    cursor:pointer;
    transition:.2s;
}

#btn-enregistrer:hover{
    background:#1783f5;
    transform:translateY(-1px);
}

#btn-enregistrer:active{
    transform:translateY(0);
}

.popup-boutons button{

    padding:12px 20px;
    border:none;
    border-radius:10px;
    font-family:'Orbitron',sans-serif;
    font-size:16px;
    font-weight:bold;
    cursor:pointer;
    transition:.2s;

}

#annuler-enregistrement{

    background:#555;
    color:white;

}

#annuler-enregistrement:hover{

    background:#666;

}

#valider-enregistrement{

    background:linear-gradient(180deg,#f8d84b,#e5a600);
    color:#17324a;

}

#valider-enregistrement:hover{

    transform:translateY(-2px);
    box-shadow:0 6px 15px rgba(0,0,0,.35);

}

#notification{
    position:fixed;
    top:20px;
    left:50%;
    transform:translateX(-50%) translateY(-80px);
    background:#0A365D;
    color:#fff;
    padding:12px 22px;
    border-radius:12px;
    border:2px solid #FFD700;
    font-family:'Orbitron',sans-serif;
    font-size:15px;
    box-shadow:0 8px 20px rgba(0,0,0,.35);
    opacity:0;
    transition:.35s;
    z-index:20000;
}

#notification.visible{
    opacity:1;
    transform:translateX(-50%) translateY(0);
}

#message-pseudo{
    min-height:22px;
    margin-top:10px;
    color:#ff7070;
    font-size:14px;
    font-weight:bold;
    opacity:0;
    transition:opacity .25s;
}

#message-pseudo.visible{
    opacity:1;
}

#actions-jeu{
    display:flex;
    justify-content:space-between;
    align-items:center;
    width:100%;
    margin-top:10px;
}

#btn-enregistrer,
#btn-palmares{
    min-width:160px;
}

#btn-palmares{
    position:absolute;
    top:50px;
    right:50px;
}

#btn-palmares { 
    transition:opacity .3s;
    padding:6px 14px;
    font-size:13px;
    font-family:'Orbitron',sans-serif;
    font-weight:600;
    color:#fff;
    background:#0A6ED1;
    border:1px solid #4EA3FF;
    border-radius:8px;
    cursor:pointer;
    transition:.2s;
}

#btn-palmares:hover{
    background:#1783f5;
    transform:translateY(-1px);
}

#btn-palmaresr:active{
    transform:translateY(0);
}

#liste-palmares{
    margin:20px 0;
    display:flex;
    flex-direction:column;
    gap:6px;
}

.ligne-palmares{
    display:grid;
    grid-template-columns:1fr 80px 120px;
    align-items:center;
    gap:15px;
    padding:6px 8px;
    border-bottom:1px solid rgba(255,255,255,.12);
}

.pseudo{
    font-weight:bold;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
	text-align:left;
}

.score{
    text-align:right;
    font-weight:bold;
    white-space:nowrap;
}

.grade{
    white-space:nowrap;
}

.palmares-vide{
    padding:30px 20px;
    text-align:center;
    color:white;
    font-size:1.1em;
    font-weight:bold;
    line-height:1.6;
}

.case.espace,
.case.fixe{

    border: none !important;
    background: transparent !important;
    box-shadow: none !important;

}

.case.fixe{

    width: 16px !important;

}

.case.espace{

    width: 26px !important;

}