/* ============================================================
   meteo.css  –  Section Météo (images Data/images/Meteo)
   À inclure dans _Layout.cshtml :
     <link rel="stylesheet" href="~/css/meteo.css" asp-append-version="true" />
   ============================================================ */

/* ---------- Conteneur de section ---------- */
.meteo-section {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    border-radius: 12px;
    padding: 2rem 1.5rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 12px rgba(0, 80, 160, 0.08);
}

.meteo-section-title {
    text-align: center;
    font-size: 1.6rem;
    color: #1a4a7a;
    margin-bottom: 0.3rem;
}

.meteo-section-subtitle {
    text-align: center;
    color: #5a7a9a;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ---------- Grille des images météo ----------
   2 colonnes en desktop : éphéméride + report côte à côte sur la 1re ligne,
   puis 24h / 7j / 30j / 365j sur les lignes suivantes.            */
.meteo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ---------- Carte météo ---------- */
.meteo-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .meteo-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0, 80, 160, 0.15);
    }

/* Étiquette de titre */
.meteo-card-label {
    background: #1a4a7a;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.45rem 1rem;
    letter-spacing: 0.03em;
}

/* ---------- Wrapper image ---------- */
.meteo-img-wrapper {
    width: 100%;
    background: #0d2d4a;
    overflow: hidden;
    line-height: 0; /* supprime l'espace inline sous l'image */
}

.meteo-img {
    width: 100%;
    height: auto;
    display: block;
    cursor: zoom-in;
    transition: opacity 0.3s ease;
}

    .meteo-img.loading {
        opacity: 0.5;
    }

/* ---------- Responsive mobile ---------- */
@media (max-width: 600px) {
    .meteo-section {
        padding: 1.2rem 0.8rem;
    }

    .meteo-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .meteo-section-title {
        font-size: 1.3rem;
    }
}

/* ============================================================
   Lightbox – zoom au clic sur une image météo
   ============================================================ */
.meteo-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    cursor: zoom-out;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem;
}

    .meteo-lightbox.open {
        display: flex;
        animation: meteo-lb-fadein 0.2s ease;
    }

@keyframes meteo-lb-fadein {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.meteo-lightbox-img {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.8);
    cursor: default;
}

.meteo-lightbox-caption {
    color: #fff;
    font-size: 0.9rem;
    text-align: center;
    opacity: 0.85;
    pointer-events: none;
}

.meteo-lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1.2rem;
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    background: none;
    border: none;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 10000;
    padding: 0.2rem 0.5rem;
}

    .meteo-lightbox-close:hover {
        opacity: 1;
        transform: scale(1.2);
    }
