/* Bouton mode plein écran */
.fullscreen-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 50px;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.fullscreen-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.fullscreen-btn i {
    margin-right: 8px;
}

/* Mode plein écran */
.fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.fullscreen-mode.active {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.3s ease;
    pointer-events: all;
}

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

/* Bouton de sortie */
.exit-fullscreen-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.exit-fullscreen-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.1);
}

.exit-fullscreen-btn:active {
    transform: rotate(90deg) scale(0.95);
}

/* Contenu plein écran */
.fullscreen-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    z-index: 1;
}

.fullscreen-title {
    color: white;
    font-size: 64px;
    margin-bottom: 40px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.5s ease;
}

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

/* Liste en plein écran */
.fullscreen-list-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 40px;
    max-width: 800px;
    width: 100%;
    max-height: 50vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.5s ease 0.2s both;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fullscreen-list-container h2 {
    color: #667eea;
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
}

.fullscreen-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fullscreen-list-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.fullscreen-list-item:hover {
    transform: translateX(10px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.item-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    flex-shrink: 0;
}

.item-text {
    font-size: 24px;
    color: #333;
    font-weight: 500;
}

/* Animation de highlight */
.fullscreen-list-item.highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: white;
    transform: scale(1.05);
}

.fullscreen-list-item.highlight .item-number {
    background: white;
    color: #667eea;
}

.fullscreen-list-item.highlight .item-text {
    color: white;
}

/* Gagnant */
.fullscreen-list-item.winner {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-color: white;
    transform: scale(1.1);
    animation: winnerPulse 1s ease infinite;
}

@keyframes winnerPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(245, 87, 108, 0.5);
    }
    50% {
        box-shadow: 0 0 40px rgba(245, 87, 108, 0.8);
    }
}

.fullscreen-list-item.winner .item-number {
    background: white;
    color: #f5576c;
    animation: numberSpin 0.5s ease;
}

@keyframes numberSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.fullscreen-list-item.winner .item-text {
    color: white;
    font-weight: bold;
}

/* Bouton de tirage plein écran */
.fullscreen-draw-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 25px 60px;
    font-size: 28px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    animation: scaleIn 0.5s ease 0.4s both;
}

.fullscreen-draw-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.fullscreen-draw-btn:active {
    transform: translateY(-2px) scale(1.02);
}

.fullscreen-draw-btn.pulse-btn {
    animation: pulseBtnAnim 1s ease infinite;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

@keyframes pulseBtnAnim {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 40px rgba(102, 126, 234, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 15px 50px rgba(102, 126, 234, 0.7);
    }
}

.fullscreen-draw-btn i {
    margin-right: 15px;
    animation: dice-roll 2s ease infinite;
}

@keyframes dice-roll {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-20deg);
    }
    75% {
        transform: rotate(20deg);
    }
}

/* Résultat plein écran */
.fullscreen-result {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px 80px;
    border-radius: 24px;
    font-size: 48px;
    font-weight: bold;
    color: #667eea;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.5s ease;
    min-width: 400px;
    text-align: center;
    position: relative;
}

.fullscreen-result.drawing {
    opacity: 1;
    animation: pulse 1s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
    }
    50% {
        transform: translateX(-50%) scale(1.05);
    }
}

.fullscreen-result.show {
    opacity: 1;
    animation: resultReveal 0.8s ease;
}

@keyframes resultReveal {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.5) rotate(-10deg);
    }
    50% {
        transform: translateX(-50%) scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1) rotate(0deg);
    }
}

/* Bouton pour fermer le résultat */
.close-result-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.3);
    color: #667eea;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.close-result-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: rotate(90deg) scale(1.1);
    border-color: #667eea;
}

.close-result-btn:active {
    transform: rotate(90deg) scale(0.95);
}

.winner-animation {
    font-size: 72px;
    display: inline-block;
    animation: bounce 0.6s ease infinite;
}

.winner-animation:first-child {
    animation-delay: 0s;
}

.winner-animation:last-child {
    animation-delay: 0.2s;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.winner-text {
    display: block;
    margin: 20px 0;
    font-size: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        filter: hue-rotate(0deg);
    }
    50% {
        filter: hue-rotate(30deg);
    }
}

/* Canvas confettis */
#confettiCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10000;
}

/* Scrollbar personnalisée pour la liste */
.fullscreen-list-container::-webkit-scrollbar {
    width: 12px;
}

.fullscreen-list-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.fullscreen-list-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.fullscreen-list-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Responsive mobile */
@media (max-width: 768px) {
    .fullscreen-title {
        font-size: 40px;
        margin-bottom: 20px;
    }
    
    .fullscreen-list-container {
        padding: 20px;
        max-height: 40vh;
    }
    
    .fullscreen-list-container h2 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .fullscreen-list-item {
        padding: 15px 20px;
        gap: 15px;
    }
    
    .item-number {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .item-text {
        font-size: 18px;
    }
    
    .fullscreen-draw-btn {
        padding: 20px 40px;
        font-size: 22px;
    }
    
    .fullscreen-result {
        font-size: 32px;
        padding: 30px 40px;
        min-width: 300px;
        bottom: 60px;
    }
    
    .close-result-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
        top: 10px;
        right: 10px;
    }
    
    .winner-animation {
        font-size: 48px;
    }
    
    .winner-text {
        font-size: 36px;
    }
    
    .exit-fullscreen-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
        top: 20px;
        right: 20px;
    }
    
    .fullscreen-btn {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
}

/* Animation d'entrée pour les éléments de la liste */
.fullscreen-list-item {
    animation: slideInRight 0.5s ease both;
}

.fullscreen-list-item:nth-child(1) { animation-delay: 0.05s; }
.fullscreen-list-item:nth-child(2) { animation-delay: 0.1s; }
.fullscreen-list-item:nth-child(3) { animation-delay: 0.15s; }
.fullscreen-list-item:nth-child(4) { animation-delay: 0.2s; }
.fullscreen-list-item:nth-child(5) { animation-delay: 0.25s; }
.fullscreen-list-item:nth-child(6) { animation-delay: 0.3s; }
.fullscreen-list-item:nth-child(7) { animation-delay: 0.35s; }
.fullscreen-list-item:nth-child(8) { animation-delay: 0.4s; }
.fullscreen-list-item:nth-child(9) { animation-delay: 0.45s; }
.fullscreen-list-item:nth-child(10) { animation-delay: 0.5s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}