/**
 * Animations pour Le Margo
 */

/* Animation de la poêle avec des aliments */
.cooking-animation {
    position: relative;
    height: 300px;
    margin: 40px auto;
    max-width: 500px;
    overflow: visible;
}

.pan-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    perspective: 800px;
}

.cooking-message {
    margin-top: 40px;
    font-style: italic;
    font-weight: 500;
    color: var(--color-secondary);
    text-align: center;
    font-size: 1.1rem;
    opacity: 0;
    animation: fadeMessage 6s ease-in-out forwards;
}

@keyframes fadeMessage {
    0%, 20% {
        opacity: 0;
        transform: translateY(20px);
    }
    40%, 90% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0.8;
    }
}

.pan {
    position: relative;
    width: 220px;
    height: 140x;
    transform-style: preserve-3d;
    animation: panShake 5s ease-in-out infinite;
    z-index: 10;
}

@keyframes panShake {
    0%, 100% {
        transform: translateX(-5px) rotate(-2deg);
    }
    25% {
        transform: translateX(5px) rotate(0deg);
    }
    50% {
        transform: translateX(-3px) rotate(2deg);
    }
    75% {
        transform: translateX(3px) rotate(0deg);
    }
}

.pan-bottom {
    position: absolute;
    bottom: 0;
    left: 10px;
    width: 220px;
    height: 60px;
    border-radius: 50% / 50%;
    background: #5555552e;
    filter: blur(4px);
    background: #0000003b;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 5;
}

.pan-circle {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 200px;
    height: 150px;
    border-radius: 50% / 50%;
    background: linear-gradient(145deg, #666, #444);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.4);
    z-index: 5;
}

.pan-handle {
    position: absolute;
    top: 50%;
    right: -100px;
    width: 120px;
    height: 25px;
    background: linear-gradient(90deg, #444, #333);
    transform: translateY(-50%);
    border-radius: 15px;
    z-index: 1;
}

.cooking-elements {
    position: absolute;
    width: 180px;
    height: 130px;
    bottom: 30px;
    left: 30px;
    border-radius: 50% / 50%;
    background-color: #f5f5f5;
    overflow: visible;
    z-index: 6;
}

.food-item {
    position: absolute;
    font-size: 30px;
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
    z-index: 15;
}

.tomato {
    top: 30%;
    left: 20%;
    animation-name: tomatoMove;
}

.mushroom {
    top: 50%;
    left: 30%;
    animation-name: mushroomMove;
}

.carrot {
    bottom: 30%;
    right: 20%;
    animation-name: carrotMove;
    animation-delay: 0.5s;
}

.broccoli {
    top: 20%;
    right: 30%;
    animation-name: broccoliMove;
    animation-delay: 0.7s;
}

.pepper {
    bottom: 20%;
    left: 50%;
    animation-name: pepperMove;
    animation-delay: 0.2s;
}

.garlic {
    top: 40%;
    right: 15%;
    animation-name: garlicMove;
    animation-delay: 0.3s;
}

.onion {
    bottom: 40%;
    left: 15%;
    animation-name: onionMove;
    animation-delay: 0.8s;
}

@keyframes tomatoMove {
    0% { transform: translate(0, 0); }
    25% { transform: translate(15px, 15px) rotate(30deg); }
    50% { transform: translate(0, 30px) rotate(60deg); }
    75% { transform: translate(-15px, 15px) rotate(30deg); }
    100% { transform: translate(0, 0); }
}

@keyframes mushroomMove {
    0% { transform: translate(0, 0); }
    30% { transform: translate(-20px, 10px) rotate(-20deg); }
    60% { transform: translate(10px, -15px) rotate(20deg); }
    100% { transform: translate(0, 0); }
}

@keyframes carrotMove {
    0% { transform: translate(0, 0); }
    40% { transform: translate(-15px, -15px) rotate(-40deg); }
    80% { transform: translate(15px, -5px) rotate(20deg); }
    100% { transform: translate(0, 0); }
}

@keyframes broccoliMove {
    0% { transform: translate(0, 0); }
    33% { transform: translate(-10px, 20px) rotate(10deg); }
    66% { transform: translate(20px, 10px) rotate(-20deg); }
    100% { transform: translate(0, 0); }
}

@keyframes pepperMove {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(25px, -15px) rotate(180deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes garlicMove {
    0% { transform: translate(0, 0); }
    25% { transform: translate(15px, 10px) rotate(45deg); }
    75% { transform: translate(-10px, -15px) rotate(-45deg); }
    100% { transform: translate(0, 0); }
}

@keyframes onionMove {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(20px, -10px) rotate(30deg); }
    66% { transform: translate(-15px, -5px) rotate(-30deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* Vapeur au-dessus de la poêle */
.steam {
    position: absolute;
    color: #999;
    font-size: 24px;
    opacity: 0;
    z-index: 20;
    animation: steamRise 3s infinite;
}

.steam-1 {
    left: 30%;
    bottom: 85%;
    animation-delay: 0.5s;
}

.steam-2 {
    left: 50%;
    bottom: 90%;
    animation-delay: 1s;
}

.steam-3 {
    left: 70%;
    bottom: 88%;
    animation-delay: 1.5s;
}

@keyframes steamRise {
    0% {
        transform: translateY(0) scale(0.8);
        opacity: 0;
    }
    30% {
        opacity: 0.7;
    }
    70% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-50px) scale(1.2);
        opacity: 0;
    }
}

/* Flammes statiques sous la poêle */
.flame {
    position: absolute;
    width: 40px;
    height: 50px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    transform-origin: center bottom;
    z-index: 3;
    box-shadow: 0 0 15px 4px rgba(255, 165, 0, 0.6);
}

.flame-1 {
    left: 34%;
    bottom: 55px;
    background: linear-gradient(to top, #ff4500, #ffa500);
}

.flame-2 {
    left: 47%;
    bottom: 58px;
    background: linear-gradient(to top, #ff4500, #ffd700);
}

.flame-3 {
    left: 60%;
    bottom: 54px;
    background: linear-gradient(to top, #ff4500, #ffa500);
} 