/* Styles pour le widget météo - La Villa Dionysos */

.weather-widget {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 20px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 350px;
    margin: 0 auto;
}

/* Design horizontal */
.weather-horizontal {
    max-width: 100%;
    padding: 24px;
}

.weather-horizontal .weather-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.weather-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e3a5f, #d4af37, #1e3a5f);
}

/* Header */
.weather-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.weather-location h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e3a5f;
}

.weather-coordinates {
    display: block;
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 2px;
}

.weather-status-indicator {
    display: flex;
    align-items: center;
}

.auto-update-indicator {
    font-size: 0.75rem;
    color: #6c757d;
    background: rgba(255, 255, 255, 0.6);
    padding: 4px 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

.auto-update-indicator::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #28a745;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

/* Contenu principal */
.weather-content {
    text-align: center;
}

.weather-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.weather-icon {
    font-size: 3rem;
    line-height: 1;
}

.weather-emoji {
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.weather-temp {
    display: flex;
    align-items: flex-start;
    gap: 2px;
}

.temp-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e3a5f;
    line-height: 1;
}

.temp-unit {
    font-size: 1.2rem;
    font-weight: 500;
    color: #6c757d;
    margin-top: 4px;
}

.weather-description {
    font-size: 1rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 20px;
}

/* Détails météo */
.weather-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.weather-detail {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.detail-icon {
    font-size: 1.2rem;
}

.detail-label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 500;
}

.detail-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e3a5f;
}

.detail-direction {
    font-size: 0.7rem;
    color: #6c757d;
}

/* Heure locale */
.weather-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    font-size: 0.9rem;
}

.time-icon {
    font-size: 1rem;
}

.time-label {
    color: #6c757d;
}

.time-value {
    font-weight: 600;
    color: #1e3a5f;
}

/* Status */
.weather-status {
    font-size: 0.8rem;
    color: #6c757d;
}

.status-updated {
    color: #28a745;
}

.status-error {
    color: #dc3545;
}

/* Loading */
.weather-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 16px;
    backdrop-filter: blur(4px);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #1e3a5f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 480px) {
    .weather-widget {
        max-width: 100%;
        margin: 0 16px;
    }

    .weather-main {
        gap: 12px;
    }

    .weather-icon {
        font-size: 2.5rem;
    }

    .temp-value {
        font-size: 2rem;
    }

    .weather-details {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 360px) {
    .weather-widget {
        padding: 16px;
    }

    .temp-value {
        font-size: 1.8rem;
    }

    .weather-icon {
        font-size: 2rem;
    }
}

/* Animation d'entrée */
.weather-widget {
    animation: weatherFadeIn 0.6s ease-out;
}

@keyframes weatherFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation de mise à jour */
.weather-updating {
    animation: weatherPulse 0.3s ease-in-out;
}

@keyframes weatherPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

/* États d'erreur */
.weather-error {
    border-color: #dc3545;
}

.weather-error::before {
    background: linear-gradient(90deg, #dc3545, #ffc107, #dc3545);
}

/* Thème sombre (optionnel) */
.weather-dark {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: #e2e8f0;
}

.weather-dark .weather-location h3,
.weather-dark .temp-value,
.weather-dark .detail-value,
.weather-dark .time-value {
    color: #e2e8f0;
}

.weather-dark .weather-coordinates,
.weather-dark .detail-label,
.weather-dark .time-label,
.weather-dark .weather-status {
    color: #a0aec0;
}

/* ===========================================
   STYLES POUR LE DESIGN HORIZONTAL
   =========================================== */

/* Conteneur principal horizontal */
.weather-main-horizontal {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Icône météo large */
.weather-icon-large {
    flex-shrink: 0;
}

.weather-emoji-large {
    font-size: 4rem;
    line-height: 1;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
    animation: weatherFloat 3s ease-in-out infinite;
}

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

/* Informations principales */
.weather-info-main {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.weather-temp-large {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}

.temp-value-large {
    font-size: 3.5rem;
    font-weight: 800;
    color: #1e3a5f;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.temp-unit-large {
    font-size: 1.8rem;
    font-weight: 600;
    color: #6c757d;
    margin-top: 8px;
}

.weather-description-large {
    font-size: 1.4rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
    text-transform: capitalize;
}

.weather-time-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 1rem;
    color: #6c757d;
}

/* Détails météo horizontaux */
.weather-details-horizontal {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.weather-detail-horizontal {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.85);
    padding: 18px 22px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.06),
        0 2px 8px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    min-width: 140px;
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.detail-icon-large {
    font-size: 2rem;
    line-height: 1;
}

.detail-content {
    text-align: left;
}

.detail-value-large {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e3a5f;
    line-height: 1.2;
}

.detail-label-small {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status horizontal */
.weather-status-horizontal {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Responsive pour horizontal */
@media (max-width: 768px) {
    .weather-horizontal {
        padding: 20px;
    }

    .weather-main-horizontal {
        gap: 16px;
    }

    .weather-emoji-large {
        font-size: 3rem;
    }

    .temp-value-large {
        font-size: 2.8rem;
    }

    .temp-unit-large {
        font-size: 1.4rem;
    }

    .weather-description-large {
        font-size: 1.2rem;
    }

    .weather-details-horizontal {
        gap: 12px;
    }

    .weather-detail-horizontal {
        padding: 12px 16px;
        min-width: 120px;
    }

    .detail-icon-large {
        font-size: 1.6rem;
    }

    .detail-value-large {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .weather-main-horizontal {
        flex-direction: column;
        text-align: center;
    }

    .weather-details-horizontal {
        justify-content: center;
    }

    .weather-detail-horizontal {
        flex: 1;
        justify-content: center;
    }

    .detail-content {
        text-align: center;
    }

    .temp-value-large {
        font-size: 2.5rem;
    }

    .weather-emoji-large {
        font-size: 2.5rem;
    }
}

/* Animations spéciales pour horizontal */
.weather-horizontal .weather-detail-horizontal {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.weather-horizontal .weather-detail-horizontal:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.9);
}

/* Gradient spécial pour horizontal */
.weather-horizontal {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f1f3f4 100%);
    position: relative;
    border-radius: 24px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.06),
        0 4px 16px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.weather-horizontal::before {
    background: #1e3a5f;
    opacity: 0.8;
}
