/* ============================================================
   CSS COMPLET - Météo Octon Salagou
   Optimisé pour Windy & Design Responsive 2026
   ============================================================ */

/* 1. BASE & TYPOGRAPHIE */
body { 
    background: #eef2f7; 
    color: #2c3e50; 
    margin: 0; 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    line-height: 1.5;
}

.container { 
    max-width: 1000px; 
    margin: 0 auto; 
    padding: 15px; 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}

/* 2. TITRES & BANDEAU */
h1 {
    text-align: center;
    color: #1e3c72;
    font-size: 2rem;
    margin: 20px 0;
}

.bandeau { 
    max-width: 900px; 
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #ffffff; 
    padding: 30px; 
    border-radius: 24px; 
    text-align: center; 
    font-size: 1.8rem; 
    box-shadow: 0 10px 25px rgba(30, 60, 114, 0.2);
    font-weight: bold;
    margin: 0 auto 10px auto; 
}

/* 3. BLOC MÉTÉO ACTUELLE */
.current-weather {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white; 
    padding: 20px; 
    border-radius: 24px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    flex-wrap: wrap; 
    gap: 20px;
    box-shadow: 0 8px 20px rgba(30, 60, 114, 0.15);
    max-width: 900px; 
    margin: 0 auto 20px auto; 
}

.main-info { 
    display: flex; 
    flex-direction: column;
    gap: 5px; 
    flex: 1; 
}

.big-temp { 
    font-size: 3.5rem; 
    color: #ff9f43; 
    font-weight: bold;
    line-height: 1;
}

/* 4. GRILLE DÉTAILS (DANS LE BLOC BLEU) */
.weather-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 18px;
    backdrop-filter: blur(8px);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-item i {
    color: #ff9f43;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.detail-label { 
    font-size: 0.65rem; 
    text-transform: uppercase;
    opacity: 0.8;
    display: block;
}

.detail-value { 
    font-size: 0.95rem; 
    font-weight: bold;
}

/* 5. PRÉVISIONS (CARTES) */
.forecast-grid { 
    display: grid; 
    grid-template-columns: repeat(5, 1fr); 
    gap: 15px; 
}

.card { 
    background: white; 
    padding: 15px; 
    border-radius: 20px; 
    text-align: center; 
    border: 1px solid #dce4ec; 
    transition: transform 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.card:hover { transform: translateY(-5px); }

.card .temp-val { 
    font-size: 1.4rem; 
    font-weight: bold; 
    color: #e67e22; 
    margin: 5px 0; 
}

/* 6. BLOCS BLANCS & RADAR (CORRIGÉ) */
.white-block { 
    background: white; 
    border-radius: 24px; 
    padding: 25px; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.05); 
    margin-bottom: 20px;
}

.radar-frame { 
    width: 100%; 
    height: 500px; /* Hauteur fixe pour éviter les coupures */
    border-radius: 15px; 
    overflow: hidden; 
    border: 1px solid #dce4ec; 
    margin-top: 15px; 
    position: relative;
    background: #f8f9fa;
}

.radar-frame iframe { 
    width: 100% !important; 
    height: 100% !important; 
    border: none;
    position: absolute;
    top: 0;
    left: 0;
}

/* 7. ANALYSE & FIABILITÉ */
.reliability-section { border-left: 10px solid #1e3c72; }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.rel-title { font-weight: bold; color: #2a5298; display: block; margin-bottom: 10px; font-size: 1.1rem; }

/* 8. RESPONSIVE DESIGN */

/* Tablettes */
@media (max-width: 992px) {
    .forecast-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Mobiles (L'essentiel est ici) */
@media (max-width: 768px) {
    .current-weather {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .main-info { align-items: center; }

    .weather-details-grid {
        width: 100%;
    }

    /* On garde une belle hauteur pour le radar sur mobile */
    .radar-frame { 
        height: 450px; 
    }

    /* On annule les anciens scale/transform qui cassaient Windy */
    .radar-frame iframe {
        transform: none !important;
        width: 100% !important;
        height: 100% !important;
    }
}

/* Petits Mobiles */
@media (max-width: 480px) {
    .forecast-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .bandeau { font-size: 1.4rem; padding: 20px; }
    .big-temp { font-size: 2.8rem; }
    .white-block { padding: 15px; }
    .radar-frame { height: 400px; }
}