/* ========================================
   STYLES WIDGET MÉTÉO - MAGIC LENA'S RANCH
   ======================================== */

/* Section météo principale */
.weather-section {
    margin: 40px auto;
    max-width: 800px;
    text-align: center;
}

.weather-section h3 {
    color: rgb(143, 12, 99);
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    margin-bottom: 30px;
    text-shadow: 0 2px 5px rgba(143, 12, 99, 0.3);
}

/* Widget météo principal */
.weather-widget {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(192, 204, 28, 0.3);
    border-radius: 25px;
    padding: 25px;
    box-shadow: 0 15px 35px rgba(143, 12, 99, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.weather-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, 
        rgba(192, 204, 28, 0.05) 0%, 
        rgba(178, 242, 236, 0.05) 25%,
        rgba(240, 240, 240, 0.05) 50%,
        rgba(178, 242, 236, 0.05) 75%,
        rgba(192, 204, 28, 0.05) 100%);
    animation: weatherGradient 15s ease infinite;
    z-index: -1;
}

@keyframes weatherGradient {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.weather-widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(143, 12, 99, 0.2);
    border-color: rgba(192, 204, 28, 0.6);
}

/* État de chargement */
.weather-loading {
    text-align: center;
    padding: 30px;
    color: rgb(143, 12, 99);
}

.weather-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(192, 204, 28, 0.3);
    border-top: 4px solid rgb(192, 204, 28);
    border-radius: 50%;
    animation: weatherSpin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes weatherSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Contenu météo principal */
.weather-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Météo actuelle */
.weather-current {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.weather-location {
    font-size: 1.3rem;
    font-weight: bold;
    color: rgb(143, 12, 99);
    margin-bottom: 15px;
    font-family: 'Dancing Script', cursive;
}

.weather-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.weather-temp {
    font-size: 3rem;
    font-weight: bold;
    color: rgb(55, 5, 26);
    text-shadow: 0 2px 5px rgba(143, 12, 99, 0.2);
}

.weather-icon img {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.2));
    animation: weatherIconFloat 3s ease-in-out infinite;
}

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

.weather-description {
    font-size: 1.2rem;
    color: rgb(143, 12, 99);
    font-style: italic;
    margin-bottom: 20px;
    text-transform: capitalize;
}

/* Détails météo */
.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.weather-detail {
    background: rgba(192, 204, 28, 0.1);
    padding: 12px 15px;
    border-radius: 15px;
    border: 1px solid rgba(192, 204, 28, 0.2);
    transition: all 0.3s ease;
}

.weather-detail:hover {
    background: rgba(192, 204, 28, 0.2);
    transform: scale(1.05);
}

.detail-label {
    font-weight: bold;
    color: rgb(143, 12, 99);
    display: block;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.weather-detail span:last-child {
    color: rgb(55, 5, 26);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Prévisions */
.weather-forecast {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.weather-forecast h4 {
    color: rgb(143, 12, 99);
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.forecast-days {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.forecast-day {
    background: rgba(192, 204, 28, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(192, 204, 28, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.forecast-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.5s ease;
}

.forecast-day:hover::before {
    left: 100%;
}

.forecast-day:hover {
    background: rgba(192, 204, 28, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(143, 12, 99, 0.2);
}

.forecast-day-name {
    font-weight: bold;
    color: rgb(143, 12, 99);
    font-size: 1.1rem;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.forecast-icon img {
    width: 50px;
    height: 50px;
    margin: 10px 0;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
}

.forecast-temps {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-weight: bold;
}

.forecast-temp-max {
    color: rgb(55, 5, 26);
}

.forecast-temp-min {
    color: rgb(143, 12, 99);
    opacity: 0.8;
}

.forecast-description {
    color: rgb(83, 33, 33);
    font-size: 0.9rem;
    font-style: italic;
    text-transform: capitalize;
}

/* État d'erreur */
.weather-error {
    text-align: center;
    padding: 30px;
    color: rgb(143, 12, 99);
}

.weather-error p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.weather-retry-btn {
    background: linear-gradient(135deg, rgba(192, 204, 28, 0.9), rgba(220, 230, 50, 0.9));
    border: 2px solid rgb(55, 5, 26);
    border-radius: 20px;
    padding: 12px 25px;
    color: rgb(55, 5, 26);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.weather-retry-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgb(220, 230, 50), rgb(240, 250, 70));
    box-shadow: 0 8px 20px rgba(143, 12, 99, 0.3);
}

/* Animations spéciales pour différentes conditions météo */
.weather-widget.sunny {
    box-shadow: 0 15px 35px rgba(255, 193, 7, 0.2);
}

.weather-widget.rainy {
    box-shadow: 0 15px 35px rgba(108, 117, 125, 0.2);
}

.weather-widget.cloudy {
    box-shadow: 0 15px 35px rgba(143, 12, 99, 0.15);
}

.weather-widget.snowy {
    box-shadow: 0 15px 35px rgba(173, 216, 230, 0.3);
}

/* Animation de neige pour les jours enneigés */
.weather-widget.snowy::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.6), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: snowfall 10s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes snowfall {
    0% { 
        background-position: 0px 0px, 0px 0px, 0px 0px, 0px 0px; 
    }
    100% { 
        background-position: 200px 100px, -200px 100px, 100px 100px, -100px 100px; 
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .weather-section {
        margin: 30px 15px;
    }
    
    .weather-section h3 {
        font-size: 1.6rem;
    }
    
    .weather-widget {
        padding: 20px;
    }
    
    .weather-main {
        flex-direction: column;
        gap: 15px;
    }
    
    .weather-temp {
        font-size: 2.5rem;
    }
    
    .weather-icon img {
        width: 60px;
        height: 60px;
    }
    
    .weather-details {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .forecast-days {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .forecast-day {
        padding: 15px;
    }
}

@media screen and (max-width: 480px) {
    .weather-section h3 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
    
    .weather-widget {
        padding: 15px;
        border-radius: 20px;
    }
    
    .weather-current,
    .weather-forecast {
        padding: 20px;
        border-radius: 15px;
    }
    
    .weather-temp {
        font-size: 2rem;
    }
    
    .weather-icon img {
        width: 50px;
        height: 50px;
    }
    
    .weather-details {
        grid-template-columns: 1fr;
    }
    
    .weather-detail {
        padding: 10px 12px;
    }
    
    .forecast-icon img {
        width: 40px;
        height: 40px;
    }
    
    .forecast-temps {
        font-size: 0.9rem;
    }
}