
/* color var */
:root {
    --blue: #00FFFF;
    --red: #F33;
    --black: #1a1a1a;
}



@font-face {
    font-family: 'Slackey';
    src: url('../fonts/Slackey/Slackey-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Oxanium';
    src: url('../fonts/Oxanium/Oxanium-VariableFont_wght.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
.slack {
    font-family: 'Slackey', cursive, sans-serif;
}
.txt{
    font-family: 'Oxanium', cursive, sans-serif;
    font-weight: 400;
}
.up {
    text-transform: uppercase;
    
}
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    max-height: 100vh;
    max-width: 100vw;
    overflow: hidden;
    font-size: 16px;
}

.white{
    color: white;
}
.fs-2 {
    font-size: 4rem;
}
.fs-3{
    font-size: 3rem;
}
.mw-80{
    max-width: 80%;
    margin: 0 auto;
}
.text-center{
    text-align: center;
}
/* =================================
    STYLES COMMUNS DES BOUTONS
    ================================= */

button, .btn {
    padding: 20px 40px;
    font-size: 1.5em;
    font-weight: bold;
    background-color: var(--blue);
    color: var(--black);
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

button::before, .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    overflow: hidden;
}

button::after, .btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
}

button:hover:not(:disabled), .btn:hover:not(:disabled) {
    transform: translateY(-2px) rotateZ(3deg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

button.clicked:not(:disabled), .btn.clicked:not(:disabled) {
    animation: buttonPulse 0.45s ease forwards;
    pointer-events: none;
}

button.clicked:not(:disabled)::before, .btn.clicked:not(:disabled)::before {
    animation: ripple1 0.6s ease-out forwards;
}

button.clicked:not(:disabled)::after, .btn.clicked:not(:disabled)::after {
    animation: ripple2 0.6s 0.1s ease-out forwards;
}

button:disabled, .btn:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes buttonPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes ripple1 {
    0% {
        width: 0;
        height: 0;
        opacity: 0.6;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    }
    100% {
        width: 200%;
        height: 200%;
        opacity: 0;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    }
}

@keyframes ripple2 {
    0% {
        width: 0;
        height: 0;
        opacity: 0.5;
        background: radial-gradient(circle, rgba(102, 126, 234, 0.4) 0%, rgba(102, 126, 234, 0.2) 30%, rgba(118, 75, 162, 0.1) 60%, transparent 100%);
    }
    100% {
        width: 500%;
        height: 500%;
        opacity: 0;
        background: radial-gradient(circle, rgba(102, 126, 234, 0.2) 0%, rgba(102, 126, 234, 0.1) 30%, rgba(118, 75, 162, 0.05) 60%, transparent 100%);
    }
}

/* Overlay d'introduction */

.title-container{
    position: relative;
}
.title-container h1,
.intro-content p.txt,
.title-container .lines
{
    transition: all 0.8s cubic-bezier(0.4,0,0.2,1);
}
.title-container .hand {
    position: absolute;
    font-size: 48px;
    transition: all 0.8s ease-out;
    width: 250px;
}
.title-container .hand img{
    width: 100%;
    height: auto;
}
.title-container .hand.first {
    top: 0;
    right: 50%;

}
.title-container .hand.first img{

    transform: translate(-66%, 59%) rotate(-7deg);
}
.title-container .hand.second {
    top:0;
    right: -5%;

}
.title-container .hand.second img{

    transform: translate(33%, -56%) rotate(173deg);
}

.title-container .lines.first {
    position: absolute;
    display: block;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
}
.title-container .lines.first::before {
    content:"";
    width: 70%;
    height: 2px;
    background: rgb(255, 255, 255);
    display: block;
}
.title-container .lines.first::after {
    content: "";
    height: 50%;
    display: block;
    width: 2px;
    background: rgb(255, 255, 255);
}
.title-container .lines.second {
    position: absolute;
    display: block;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}
.title-container .lines.second::before {
    content: "";
    width: 70%;
    height: 2px;
    background: rgb(255, 255, 255);
    display: block;
    position: absolute;
    bottom: 0;
    right:0;
}
.title-container .lines.second::after {
    content: "";
    height: 50%;
    display: block;
    width: 2px;
    background: rgb(255, 255, 255);
    position: absolute;
    bottom: 0;
    right: 0;
}


body.introduction .title-container .hand.first {
    top: 20%;
    right: 20%;
    transform: scale(0.5);
}
body.introduction .title-container .hand.second {
    top: 50%;
    right: 30%;
    transform: scale(0.5);
}

body:not(.introduction):not(.starting) #intro-overlay-title .hand.first {
    top: 220%;
    right: 140%;
    transform: scale(0.9);
}

body:not(.introduction):not(.starting) #intro-overlay-title .hand.second {
    top: -110%;
    right: -85%;
    transform: scale(0.9);
}
body:not(.introduction):not(.starting) #intro-overlay-title h1,
body:not(.introduction):not(.starting) #intro-overlay-title .lines,
body:not(.introduction):not(.starting) #intro-overlay-title p.txt{
    opacity: 0 !important;
}

body.introduction .title-container h1,
body.introduction .intro-content p.txt,
body.introduction .title-container .lines,
body.introduction .intro-content .intro-button-wrapper{
    opacity:0;
    animation: none !important;
}
body.introduction .intro-content .choose-player-number-btn:not(.selected){
    width: 0px;
    padding: 0;
    opacity: 0;
    margin: 0;
    color: transparent;
}
body.introduction .intro-content .choose-player-number-btn.selected {
    padding: 10px 15px;
    font-size: 3.2em;
    border-radius: 100px;
    background-color: transparent;
    color:#fff;
}
body.introduction .intro-content .label {
    font-size: 3em;
}

body.introduction .lines.first {
    transform: scale(1.5);
}

body.introduction .lines.second {
    transform: scale(1.5);
}



#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000000eb 0%, #0000005f 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(28px);
}
#intro-overlay .intro-content {
    padding-bottom: 10vh;
}
#intro-overlay-title {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 10000;
    pointer-events: none;
}
#intro-overlay-title .intro-content{
    padding-top: 18vh;
}
#intro-overlay.hidden,
#intro-overlay-title.hidden {
    display: none !important;
}
.intro-content {
    text-align: center;
    color: white;
    padding: 40px;
    max-width: 600px;
}

.intro-content h1 {
    font-size: 5em;
    line-height: 1em;
    margin-bottom: 20px;
    animation: fadeInDown 0.8s ease;
    padding: 3rem 0;
}

.intro-content p {
    font-size: 30px;
    margin-bottom: 90px;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
    text-align: right;
}

#intro-btn {
    /*animation: fadeInUp 0.8s ease 0.4s both;*/
    background-color: var(--red);
    color: var(--black);
}
#intro-btn.disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}
.intro-button-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}
.choose-player-number-btn{
    margin-right: 10px;
    padding: 15px 30px;
    font-size: 2em;
    background-color: var(--blue);
    color: var(--black);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    aspect-ratio: 1 / 1;
}
.choose-player-number-btn.selected {
    background-color: var(--red); 
}
span.label {
    font-size: 1.9em;
    margin-left: 15px;
    color: #ddd;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Écran d'accueil */
#start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000c2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 41;
    overflow: hidden;

    backdrop-filter: blur(10px);
}
#start-overlay.hidden {
    display: none;
}

#start-btn {
    padding: 10px 30px;
    font-size: 32px;
    margin-top: 30px;
    margin-bottom: 30px;
}

#start-btn.ready {
    background-color: var(--red);
    color: white;
}

/* Container des challenges */
.challenges-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    max-width: 1400px;
    width: 100%;
    padding: 0;
    
    position: absolute;
    z-index: 42;
    width: 20vw;
    height: 100vh;
    background: #00c3ff70;
    left: 0;
    overflow: auto;

    display: none; /* masqué dev */
}

/* Scrollbar personnalisée pour Chrome/Edge/Safari */
.challenges-container::-webkit-scrollbar {
    width: 6px;
}

.challenges-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.challenges-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.challenges-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Scrollbar pour Firefox */
.challenges-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(0, 0, 0, 0.1);
}

.icon{
    font-size: 6em;
}

#colors_container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    
}
.color-encart{
    width: 15%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-direction: column;
    overflow: hidden;
    background-color: #000000ad;
}
.color-encart.bleu{
    background-color: #0e12df;
}
.color-encart.rouge{
    background-color: #ff0000;
}
.color-encart.vert{
    background-color: #00ff00;
}
.color-encart.jaune{
    background-color: #ffff00;
}
.color-encart.violet{
    background-color: #8a2be2;
}
.color-encart.rose{
    background-color: #ff69b4;
}
.color-encart.orange {
    background-color: #f8510f;
}
.color-encart.gris {
    background-color: #808080;
}
.color-encart.no-color {
    background: linear-gradient(135deg, #3f3f3f, #6b6b6b);
}

.fallback-player-label {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(201, 201, 201, 0.795);
    padding-bottom: 50px;
    display: none;
}
.color-encart.m::after {
    content: 'm';
    font-size: 2em;
}
.color-encart.a::after {
    content: 'a';
    font-size: 2em;
}
.color-encart.t::after {
    content: 't';
    font-size: 2em;
}
.color-encart.e::after {
    content: 'e';
    font-size: 2em;
}

.accessory-label {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.5));
}

.constraint-chips {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: unset;
    width: 90%;
    z-index: 3;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.constraint-chip {
    display: block;
    padding: 0;
    border-radius: 0;
    font-size: 1.2vw;
    line-height: 1.1;
    color: #070000;
    border: none;
    background: none;
    white-space: normal;
    text-align: center;
    font-family: 'Oxanium', cursive, sans-serif;
    font-weight: 700;
    box-shadow: none;
    margin: 0;
}

.constraint-chip.accessory-chip {
    background: none;
}

.constraint-chip.gesture-chip {
    background: none;
}

.constraint-chip.expression-chip {
    background: none;
}

@media (max-width: 768px) {
    .color-encart {
        width: 32vw;
        height: 32vw;
        max-width: 32vw;
        max-height: 32vw;
        min-width: 50px;
        min-height: 50px;
    }
    .constraint-chip {
        font-size: 4vw;
        padding: 0;
    }
}

/* Cartes de menu */
/*
.menu__container {
width: 200px;
height: 300px;
border-radius: 5px;
cursor: pointer;
box-shadow: 0 10px 40px 2px rgba(0, 0, 0, 0.4);
background: #000;
transform-origin: center center 0px;
transition: all 0.5s ease-out;
animation-name: animate;
animation-duration: 3s;
animation-iteration-count: infinite;
transform: perspective(1000px) rotateX(35deg) rotateY(4deg) rotateZ(-30deg) scale(0.75);
z-index: 1;
}

.menu__container.active {
animation: activateCard 2s cubic-bezier(0.4, 0.0, 0.2, 1.2) forwards;
}

.menu__container.removeActive {
animation: deactivateCard 2s cubic-bezier(0.6, 0.0, 0.4, 1) forwards;
}


.menu__container.active::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-radius: 5px;
background: linear-gradient(135deg, #ff8c00 0%, #ff8c00 10%, #ffb152 16%, #ff8c00 19%,#ff6600 50%, #ff8c00 100%);
opacity: 0;
animation: fadeInGradient 3s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
z-index: -1;
}

.menu__container.removeActive::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border-radius: 5px;
background: linear-gradient(135deg, #ff8c00 0%, #ff8c00 10%, #ffb152 16%, #ff8c00 19%,#ff6600 50%, #ff8c00 100%);
opacity: 1;
animation: fadeOutGradient 2s cubic-bezier(0.4, 0.0, 0.2, 1) forwards;
z-index: -1;
}

@keyframes activateCard {
0% {
transform: perspective(1000px) rotateX(35deg) rotateY(4deg) rotateZ(-30deg) translateY(0px) translateX(0px) scale(0.75);
}

100% {
transform: perspective(1000px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) translateY(4px) translateX(0px) scale(1);
}
}

@keyframes deactivateCard {
0% {
transform: perspective(1000px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) translateY(4px) translateX(0px) scale(1);
}

100% {
transform: perspective(1000px) rotateX(35deg) rotateY(4deg) rotateZ(-30deg) translateY(0px) translateX(0px) scale(0.75);
}
}

@keyframes fadeInGradient {
0% {
opacity: 0;
}

100% {
opacity: 1;
}
}

@keyframes fadeOutGradient {
0% {
opacity: 1;
}

100% {
opacity: 0;
}
}

.challenge-content {
text-align: center;
}

.challenge-name {
font-size: 20px;
font-weight: bold;
margin-bottom: 15px;
color: #fff;
}

.challenge-notice {
font-size: 14px;
line-height: 1.5;
color: #ddd;
}

.menu__container:not(.active) .challenge-name,
.menu__container:not(.active) .challenge-notice,
.menu__container:not(.active) .icon {
filter: blur(6px);
}

@keyframes animate {
0% {
transform: perspective(1000px) rotateX(35deg) rotateY(4deg) rotateZ(-30deg) translateY(0px) scale(0.75);
}

50% {
transform: perspective(1000px) rotateX(35deg) rotateY(4deg) rotateZ(-30deg) translateY(-10px) scale(0.75);
}

100% {
transform: perspective(1000px) rotateX(35deg) rotateY(4deg) rotateZ(-30deg) translateY(0px) scale(0.75);
}
}

*/

/* simple menu */
.menu__container .icon {
    display: none;
}
.menu{
    padding: 0 10px;
    margin: 10px 0;
}
.menu__container {
    width: 200px;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    transform-origin: center center 0px;
    transition: all 0.3s ease;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;        
    align-items: center;
    transform-style: preserve-3d;
}   

.menu__container:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.menu__container:active {
    animation: flipButton 0.6s ease;
}

.menu__container.active {
    background: linear-gradient(135deg, #ff8c00 0%, #ff8c00 10%, #ffb152 16%, #ff8c00 19%,#ff6600 50%, #ff8c00 100%);
}

.menu__container.removeActive {
    background: var(--red);
color: var(--black);
}
.challenges-list{
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
}











.menu {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    height: 100%;
    color: #fff;
    padding: 20px;
}



/* Interface principale */
#main-interface {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    /*aspect-ratio: 4 / 3;*/
    height: 100vh;
    width: 100vw;
}
#video-wrapper{
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    background: #090909;
}
#video {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
body.captured #video{
    opacity: 0.3;
    filter: blur(8px);
}

#canvas {
    display: none;
}        
#overlay-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}     



.countdown {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.548);
    z-index: 39;
    transition: all 4s ease-out;
    opacity: 0;
}

.countdown.transparent-bg {
    opacity: 1;
}


.countdown-number {
    font-size: 200px;
    font-family: 'Slackey', cursive, sans-serif;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.8),
                 0 0 60px rgba(255, 255, 255, 0.6);
    transition: font-size 10s ease-out, opacity 3s ease-out;
    position: relative;
    z-index: 2;
}



.countdown {
    position: absolute;
    width: 240px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    z-index: 39;
    border-radius: 50%;
    box-shadow: 0 0 30px #000a;
    transition:
        background 1s ease-out,
        transform 1.1s cubic-bezier(0.4,0,0.2,1),
        opacity 0.7s cubic-bezier(0.4,0,0.2,1);
    top: 0;
    left: 0;
    right: auto;
    bottom: auto;
    opacity: 0;
    transform: translate(calc(50vw - 50%), calc(50vh - 50%));
}

.countdown.transparent-bg {
    opacity: 1;
}

.countdown.auto-move-top-right {
    /* Passe du centre à en haut à droite avec une seule transition transform */
    top: 0;
    left: 0;
    right: auto;
    bottom: auto;
    transform: translate(calc(100vw - 280px), 40px);
    opacity: 1;
}
.toggle-btn {
    padding: 10px 20px;
    font-size: 14px;
    background-color: var(--red);
    color: var(--black);
    z-index: 5;
}

.toggle-btn.active {
    background-color: #28a745;
}
.controls {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 5;

    display: none; /* masqué dev */
}

/* angles décoratifs */

.angle.first {
    position: absolute;
    display: block;
    width: 100%;
    height: 100%;
    left: 20px;
    top: 20px;
    /* click through */
    pointer-events: none;
}

.angle.first::before {
    content: "";
    width: 70%;
    height: 2px;
    background: rgb(255, 255, 255);
    display: block;
}

.angle.first::after {
    content: "";
    height: 50%;
    display: block;
    width: 2px;
    background: rgb(255, 255, 255);
}

.angle.second {
    position: absolute;
    display: block;
    width: 100%;
    height: 100%;
    top: -20px;
    left: -20px;
    /* click through */
    pointer-events: none;
}

.angle.second::before {
    content: "";
    width: 70%;
    height: 2px;
    background: rgb(255, 255, 255);
    display: block;
    position: absolute;
    bottom: 0;
    right: 0;
}

.angle.second::after {
    content: "";
    height: 50%;
    display: block;
    width: 2px;
    background: rgb(255, 255, 255);
    position: absolute;
    bottom: 0;
    right: 0;
}

.capture-btn {
    padding: 15px 30px;
    font-size: 18px;
    background-color: var(--red);
    color: var(--black);
}
.instruction-panel {
    position: fixed;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    max-width: 1300px;
    background: transparent;
    color: white;
    padding: 40px 60px;
    border-radius: 20px;
    z-index: 39;
    text-align: left;
    transform-origin: center top;
    will-change: transform, opacity;
    transition: transform 1s cubic-bezier(0.4, 0.0, 0.2, 1), 
                opacity 0.6s ease-out;
    text-align: center;
}
.instruction-panel h2 {
    font-size: 48px;
    margin: 0 0 20px 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.instruction-panel p {
    font-size: 32px;
    margin: 0;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
.instruction-panel.invisible {
    display: none;
}
.instruction-panel.hidden {
    pointer-events: none;
    /* Déplacer en bas à droite + réduire à 40% de la taille */
    transform:translateX(-26vw) translateY(59vh) scale(0.6);
    opacity: 0.8;
}
.instruction-panel.hidden h2{
    opacity: 0;
}
.instruction-panel.hidden p{
    opacity: 0;
}
#photo-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    z-index: 200;
}
#photo-container #stars-container{
    display: flex;
    gap: 10px;
    justify-content: center;
    font-size: 40px;
}
#photo-container #stars-container .star{
    color: #202020;
}
#photo-container #stars-container .star.filled {
    color: #dfc902;
}
#photo {
    max-width: 80vw;
    max-height: 70vh;
    border: 2px solid #333;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    display: block;
    transform: scale(0.7) rotate(-10deg);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: photoAppear 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Animation d'apparition de la photo */
@keyframes photoAppear {
    0% {
        transform: scale(0.7) rotate(-10deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.08) rotate(3deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(2deg);
        opacity: 1;
    }
}


.close-photo-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 201;
}

.close-photo-btn:hover {
    background: rgba(255, 0, 0, 0.8);
}

/* Debug upload */
.debug-upload-wrapper {
    text-align: center;
    background: #eaeaea;
    padding: 10px;
    width: 50%;
    margin: 20px auto 0 auto;
    border-radius: 6px;
}

.debug-upload-label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.debug-upload-input {
    font-size: 12px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    cursor: pointer;
}

#rate-wrapper {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translate(-50%, 10vh);
    z-index: 200;
}
#rate-btn {
    padding: 15px 30px;
    font-size: 18px;
    background-color: #28a745;
    display: none;
    z-index: 200;
}
.loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007bff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    display: none;
    z-index: 231;
}
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}
#result {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    border-radius: 5px;
    display: none;
    z-index: 232;
    font-size: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
#result.success {
    background-color: #d4eddaab;
    color: #155724;
    border: 1px solid #c3e6cb96;
}
#result.error {
    background-color: #f8d7dacc;
    color: #721c24;
    border: 1px solid #f5c6cbe7;
}

/* =================================
    PLAYER AUDIO D'AMBIANCE
    ================================= */

#ambiance-player {
    position: fixed;
    bottom: 20px;
    left: 90px;
    z-index: 9999;
}

.ambiance-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--blue);
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.ambiance-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.ambiance-btn:active {
    transform: scale(0.95);
}

.volume-menu {
    position: absolute;
    bottom: 70px;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.volume-menu.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

.volume-btn {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background: #f0f0f0;
    border: 2px solid transparent;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.volume-btn:hover {
    background: #e0e0e0;
    transform: scale(1.05);
}

.volume-btn.active {
    background: var(--blue);
}

.volume-btn:active {
    transform: scale(0.95);
}

/* =================================
    MENU TOGGLE (BURGER)
    ================================= */

#menu-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
}

.menu-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--blue);
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: black;
}

.menu-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.menu-btn:active {
    transform: scale(0.95);
}

.menu-dropdown {
    position: absolute;
    bottom: 70px;
    left: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 250px;
    max-height: 70vh;
    overflow-y: auto;
}

.menu-dropdown.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

.menu-item {
    padding: 12px 16px;
    border-radius: 8px;
    background: #f0f0f0;
    border: 2px solid transparent;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    white-space: nowrap;
    color: #333;
}

.menu-item:hover {
    background: #e0e0e0;
    transform: translateX(-3px);
}

.menu-item:active {
    transform: scale(0.98);
}

.menu-divider {
    height: 1px;
    background: #ddd;
    margin: 4px 0;
}

.menu-challenges-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.menu-challenge-item {
    white-space: normal;
    word-break: break-word;
    text-align: left;
    padding: 8px 12px;
    font-size: 13px;
}

#debug-status {
    font-weight: bold;
    color: var(--red);
color: var(--black);
}
