/* ===================================
   HYDRACOM MÉTÉO - STYLES PRINCIPAUX
   =================================== */

.hydracom-meteo-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 800px;
    margin: 20px auto;
}

/* En-tête */
.hydracom-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.hydracom-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hydracom-icon {
    font-size: 32px;
    animation: float 3s ease-in-out infinite;
}

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

.hydracom-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ade80;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hydracom-status.error .status-indicator {
    background: #ef4444;
}

/* Grille des capteurs */
.hydracom-sensors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.hydracom-sensor {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hydracom-sensor:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.25);
}

.sensor-icon {
    font-size: 36px;
    min-width: 40px;
    text-align: center;
}

.sensor-info {
    flex: 1;
}

.sensor-name {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 5px;
    font-weight: 500;
}

.sensor-value {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.sensor-value .value {
    font-size: 28px;
}

.sensor-value .unit {
    font-size: 16px;
    opacity: 0.8;
    font-weight: 500;
}

.wind-direction {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
    margin-left: 5px;
}

/* Pied de page */
.hydracom-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.hydracom-refresh-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.hydracom-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hydracom-refresh-btn:active {
    transform: translateY(0);
}

.hydracom-refresh-btn[data-loading="true"] .refresh-icon {
    animation: spin 1s linear infinite;
}

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

.hydracom-timestamp {
    opacity: 0.8;
    font-size: 12px;
}

.timestamp-value {
    font-weight: 600;
}

/* Messages d'erreur */
.hydracom-error {
    background: #ef4444;
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 5px 20px rgba(239, 68, 68, 0.3);
}

/* Style minimal */
.hydracom-meteo-widget[data-style="minimal"] {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #1f2937;
    padding: 20px;
}

.hydracom-meteo-widget[data-style="minimal"] .hydracom-sensor {
    background: rgba(255, 255, 255, 0.8);
}

.hydracom-meteo-widget[data-style="minimal"] .hydracom-status {
    background: rgba(0, 0, 0, 0.05);
    color: #1f2937;
}

/* Responsive */
@media (max-width: 768px) {
    .hydracom-meteo-widget {
        padding: 20px;
    }
    
    .hydracom-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .hydracom-title {
        font-size: 22px;
    }
    
    .hydracom-sensors-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .hydracom-footer {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .hydracom-sensor {
        padding: 15px;
    }
    
    .sensor-icon {
        font-size: 28px;
    }
    
    .sensor-value .value {
        font-size: 24px;
    }
}

/* Animation de chargement */
.hydracom-loading {
    text-align: center;
    padding: 40px;
}

.hydracom-loading::after {
    content: "⏳";
    font-size: 48px;
    animation: spin 2s linear infinite;
}

/* Effet de brillance au survol */
.hydracom-sensor::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.hydracom-sensor:hover::before {
    left: 100%;
}

.hydracom-sensor {
    position: relative;
    overflow: hidden;
}
