/* Animation de cadeau pour les codes promo */
.gift-animation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gift-animation-container.show {
    opacity: 1;
    pointer-events: auto;
}

.gift-box {
    position: relative;
    width: 200px;
    height: 200px;
    perspective: 600px;
    transform-style: preserve-3d;
}

.gift-box-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: gift-bounce 0.5s ease-in-out;
}

.gift-lid {
    position: absolute;
    width: 100%;
    height: 30px;
    top: -30px;
    background-color: #E37222;
    border-radius: 5px 5px 0 0;
    transform-origin: bottom;
    animation: open-lid 1.5s forwards;
}

.gift-box-body {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #ff9f5a;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.gift-ribbon {
    position: absolute;
    width: 30px;
    height: 100%;
    background-color: #E37222;
    left: 50%;
    transform: translateX(-50%);
}

.gift-ribbon-horizontal {
    position: absolute;
    width: 100%;
    height: 30px;
    background-color: #E37222;
    top: 50%;
    transform: translateY(-50%);
}

.gift-message {
    position: absolute;
    top: 220px;
    width: 300px;
    text-align: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f00;
    opacity: 0;
}

.discount-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: show-discount 2s forwards 0.8s;
}

.close-animation {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 10000;
}

/* Animations */
@keyframes open-lid {
    0% {
        transform: rotateX(0);
    }
    50% {
        transform: rotateX(-80deg);
    }
    100% {
        transform: rotateX(-110deg);
    }
}

@keyframes gift-bounce {
    0% {
        transform: scale(0.5);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes show-discount {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(1000px) rotate(360deg);
        opacity: 0;
    }
}
